FlowKMFEncrypter in a Flow Action

task australia Updated Sep 10, 2026 1 min read allow-flowkmfencrypter-restricted-caller-access.md
Raw file servicenow.com

Resolve 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.

Before you begin

Role required: admin and security_admin

About this task

When you use FlowKMFEncrypter in a Flow Action, the action might fail with the following error:

JavaScript
Error: undefined is not a function., Detail: undefined is not a function

This 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.

Procedure

  1. Create or locate the auto-created Restricted Caller Access Privilege record with the following values:

    Field Value
    Source Scope Global
    Source Type Flow Action
    Source Name of Flow Action
    Target Script Include: FlowKMFEncrypter
    Operation Execute API
  2. Change Status from Requested to Allowed.

  3. Retest the action.

Result

The Flow Action runs without the error, and the FlowKMFEncrypter operation is permitted.

What to do next

Note: If the Flow Action is updated later, the Restricted Caller Access Privilege status changes to Invalidated. Update it back to Allowed.

Parent Topic:FlowKMFEncrypter API

Keywords FlowKMFEncrypterRestricted Caller Access PrivilegeFlow Actiontroubleshootingundefined is not a function
Search documentation
Search document titles and file paths on the australia branch