Create an event hook

After creating your external service (your code), you need to connect the external service with Okta and enable it for a particular process flow.

Only super admins can view and configure event hooks. A maximum of 10 event hooks are allowed for each org.

If you've enabled the Early Access feature Event Hooks Filters, the event-creation procedure is different. Skip the following steps and go to the next section, Create an event hook with filters.

  1. In the Admin Console, go to WorkflowEvent Hooks.

  2. Click Create Event Hook.
  3. Define the following attributes:

    • Name: Enter a descriptive name for the event hook.
    • URL: Enter the external service's endpoint URL where the event hook sends the request.
    • Optional. For enhanced security and to secure the communication channel between Okta and your external service, add authentication in the following fields:

      • Authentication field: Enter the name of the authorization header.
      • Authentication secret: Enter the value that corresponds to the field name.
    • Optional. To create custom proprietary headers for extra authorization security, click Add Field in the Custom headers area and then complete these fields:

      • Field Name: optional field name / value pairs to send with the request
      • Value: Enter a value for the field name.

    • Subscribe to events: Click inside the text box to show the list of events, and then select the events that you want to add.
  4. Click Save & Continue.
  5. In the Verify Endpoint Ownership window, click Verify. You can verify your hook later, if required.

  6. If Okta successfully verifies the endpoint, it's listed as Active on the event hooks page.

Create an event hook with filters

Early Access release. See Enable self-service features.

Use filters with event hooks when you want to refine when an event hook is called for specific event types.

Add hook details

  1. In the Admin Console, go to WorkflowEvent Hooks.

  2. Click Create Event Hook.
  3. Complete these fields:

    • Endpoint URL: Enter the external service's endpoint URL where the event hook sends the request.
    • Event Hook name: Enter a unique name for the event hook.
    • Description: Optional. Enter the purpose and a description of the event hook.

  4. Optional. For enhanced security and to secure the communication channel between Okta and your external service, add authentication under Enhance security:

    • Authentication field: Enter the name of the authorization header.

    • Authentication secret: Enter the value that corresponds to the field name.
  5. Optional. To create custom proprietary headers for extra authorization security, click Add Field under Custom headers, and then complete these fields:

    • Field Name: Enter a name for the custom header.

    • Value: Enter a value for the field name.

  6. Click inside of text box under Select Events, and then select the events that you want to add.

  7. Click Create hook & Continue to save the unverified event hook.

Apply filters to events (optional)

  1. For each set of events, to filter the number of events that you receive, select Apply filter.

  2. Use the field dropdown menus to create a filter, or click Use Okta Expression to enter a custom filter. See Okta Expression Language and event hooks .

  3. Click Save & Continue.

Preview (optional)

The event hook preview function bypasses any event hook filters.

  1. In the Configure Event Hook request section, confirm the name and URL of your event hook are correct.

  2. Select an Event Type from the dropdown menu.

  3. Select a System Log Event for the Event Type. If no events are available, the preview uses sample JSON.

  4. Optional. In the JSON section click Edit to make changes in the code, and then click Save.

    When no events are generated for an event type, the Event Hook Preview displays an example event with sample data. Undetermined fields are set to null, which you can replace with custom values for testing.

  5. Click Deliver Request to test the JSON payload for the event hook request. A message displays the status of the event hook request.

  6. Click Next.

Activate hook

Before you can send an event request to your endpoint, Okta must make a one-time GET verification request to your endpoint. Okta passes a verification value to your service that it needs to send back, which confirms that you control the endpoint. To understand how endpoint verification works, refer to One-Time Verification Request and Verifying your endpoint.

Workflows API URLs don't need to be verified.

If your external service code is ready to verify the event hook, click Verify. Or click Do it later.

When Okta successfully verifies the endpoint, it's listed as Active on the Event Hooks page.

It may take several minutes before events are sent to the event hook after it’s created or updated.

Related topics

Verify an event hook

Preview an event hook