{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":41720,"path":"platform-security/platform-encryption/allow-flowkmfencrypter-restricted-caller-access.md","title":"FlowKMFEncrypter in a Flow Action","bundle":null,"doc_type":null,"release":"australia","body":"\n# FlowKMFEncrypter in a Flow Action\n\nResolve the \"undefined is not a function\" error that occurs when a Flow Action calls the FlowKMFEncrypter API, by allowing the operation in the Restricted Caller Access Privilege record.\n\n## Before you begin\n\nRole required: admin and security\\_admin\n\n## About this task\n\nWhen you use FlowKMFEncrypter in a Flow Action, the action might fail with the following error:\n\n```\nError: undefined is not a function., Detail: undefined is not a function\n```\n\nThis error occurs because the Restricted Caller Access Privilege record is not permitted. To resolve the error, locate or create the **Restricted Caller Access Privilege** record using Workflow Studio for the Flow Action and set its status to allowed.\n\n## Procedure\n\n1.  Create or locate the auto-created Restricted Caller Access Privilege record with the following values:\n\n    |Field|Value|\n    |-----|-----|\n    |**Source Scope**|Global|\n    |**Source Type**|Flow Action|\n    |**Source**|Name of Flow Action|\n    |**Target**|Script Include: **FlowKMFEncrypter**|\n    |**Operation**|Execute API|\n\n2.  Change **Status** from **Requested** to **Allowed**.\n\n3.  Retest the action.\n\n\n## Result\n\nThe Flow Action runs without the error, and the FlowKMFEncrypter operation is permitted.\n\n## What to do next\n\n**Note:** If the Flow Action is updated later, the Restricted Caller Access Privilege status changes to **Invalidated**. Update it back to **Allowed**.\n\n**Parent Topic:**[FlowKMFEncrypter API](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-security/platform-encryption/flowkmfencrypter-api.md)\n\n"}}