PingOne Advanced Identity Cloud

Script triggers defined in the managed object configuration

For information about how managed objects are handled, and the available script triggers, refer to Managed objects.

Managed object configuration object

The following list describes the variables for each trigger:

onCreate, postCreate
  • object: The content of the object being created.

  • newObject: The object after the create operation is complete.

  • context: Information related to the current request, such as client, end user, and routing.

  • resourceName: The resource path of the object of the query. For example, if you create a managed user with ID 42f8a60e-2019-4110-a10d-7231c3578e2b, resourceName returns managed/realm-name_user/42f8a60e-2019-4110-a10d-7231c3578e2b.

  • request: Information related to the request, such as headers, credentials, and the desired action. Also includes the endpoint, and payload to be processed.

onUpdate, postUpdate

Return a JSON object. Variables:

  • object: The content of the object being updated.

  • oldObject: The state of the object, before the update.

  • newObject: Changes to be applied to the object. May continue with the onUpdate trigger.

  • context: Information related to the current request, such as client, end user, and routing.

  • resourceName: The resource path of the object the query.

  • request: Information related to the request, such as headers, credentials, and the desired action. Also includes the endpoint, and payload to be processed.

onDelete, onRetrieve, onRead

Return a JSON object. Variables:

  • object: The content of the object.

  • context: Information related to the current request, such as client, end user, and routing.

  • resourceName: The resource path of the object the query.

  • request: Information related to the request, such as headers, credentials, and the desired action. Also includes the endpoint, and payload to be processed.

postDelete

Returns a JSON object. Variables:

  • oldObject: Represents the deleted object.

  • context: Information related to the current request, such as client, end user, and routing.

  • resourceName: The resource path of the object the query is performed upon.

  • request: Information related to the request, such as headers, credentials, and the desired action. Also includes the endpoint, and payload to be processed.

onSync

Returns a JSON object. Variables:

  • oldObject: Represents the object prior to sync. If sync has not been run before, the value will be null.

  • newObject: Represents the object after sync is completed.

  • context: Information related to the current request, such as client, end user, and routing.

  • request: Information related to the request, such as headers, credentials, and the desired action. Also includes the endpoint, and payload to be processed.

  • resourceName: An object representing the resource path the query is performed upon.

  • syncResults: A map containing the results and details of the sync, including:

    • success (boolean): Success or failure of the sync operation.

    • action: Returns the name of the action performed as a string.

    • syncDetails: The mappings attempted during synchronization.

onStore, onValidate

Return a JSON object. Variables:

  • object: Represents the object being stored or validated.

  • value: The content to be stored or validated for the object.

  • context: Information related to the current request, such as client, end user, and routing.

  • resourceName: The resource path of the object the query is performed upon.

  • request: Information related to the request, such as headers, credentials, and the desired action. Also includes the endpoint, and payload to be processed.

Property object

The following list describes the variables for each trigger:

onRetrieve, onStore

Return a JSON object. Variables:

  • object: Represents the object being operated upon.

  • property: The value of the property being retrieved or stored.

  • propertyName: The name of the property being retrieved or stored.

  • context: Information related to the current request, such as client, end user, and routing.

  • resourceName: The resource path of the object the query is performed upon.

  • request: Information related to the request, such as headers, credentials, and the desired action. Also includes the endpoint, and payload to be processed.

onValidate

Returns a JSON object. Variables:

  • property: The value of the property being validated.

  • context: Information related to the current request, such as client, end user, and routing.

  • resourceName: The resource path of the object the query is performed upon.

  • request: Information related to the request, such as headers, credentials, and the desired action. Also includes the endpoint, and payload to be processed.

Copyright © 2010-2024 ForgeRock, all rights reserved.