OBLYTECH Logo
OBLYTECH Logo

Okta Spoke for ServiceNow: Setup and Actions

The Okta spoke is an IntegrationHub package that lets flows in ServiceNow create and manage Okta users, passwords, groups, applications and event hooks through the Okta REST API. It needs an IntegrationHub subscription and an Okta API key or OAuth application. The current spoke lists 49 actions grouped into nine categories. For the wider integration picture, see the ServiceNow and Okta integration guide.

What the Okta spoke is

A spoke is a package of reusable actions for a third-party system. You drop those actions into a flow in Workflow Studio instead of writing REST calls by hand. The Okta spoke applies that idea to Okta: the actions call the Okta REST API, and the spoke adds an Okta application to the instance with four modules: Okta Applications, Okta groups, Okta Users and Okta Webhook Registry. For the general concept, see ServiceNow spoke explained, and for the platform itself, the plain-language guide to Integration Hub. Actions are covered in ServiceNow Action (Flow Designer) explained.

What you need before you start

The Okta spoke requires an IntegrationHub subscription, and the spoke itself must be activated on the instance. You also need an Okta account configured to use a web API key, plus the admin role on the ServiceNow side. On the Okta side, an Okta administrator generates the API key, and an admin creates the OAuth application if you take the OAuth route. For subscription planning, see Integration Hub licensing and cost factors.

Two optional pieces change how the spoke behaves:

  • A MID Server. The actions are REST calls that run either on the instance or through a MID Server, and the connection record linked to the Okta alias controls which. If needed, you can also set MID Server selection attributes there. For the background, see ServiceNow MID Server explained.
  • Now Assist. The conversational subflows and the conversational action depend on Now Assist for Conversational Spokes, and the AI agents depend on Now Assist for Integration Hub.

Dependent plugins

If installation fails, confirm these plugins are present: ServiceNow IntegrationHub Action Template – Data Stream, IntegrationHub Action Step – REST, IntegrationHub Runtime, Flow Designer – Dynamic Inputs, XML Parser for IntegrationHub, Flow Designer Model, Complex Object and Remote Directory Sync. Some of them are licensable features.

How connection and credential aliases work

The spoke uses the Okta Connection & Credential Alias record to authorize its actions. An alias stands in for the real connection details, and IntegrationHub resolves it at runtime. Using an alias removes the need to configure separate credential and connection profiles for each environment. If the connection or credential information changes, the actions that use it do not need updating. Multiple active connections on one alias are not supported for IntegrationHub integrations. For the general concept, see connection and credential alias explained, and for promotion between environments, Integration Hub authentication.

One limit matters during setup: only one alias can be active at a time for a ServiceNow domain. Settle on one authentication method first and get it working before you consider the other.

Set up the spoke with an API key

The API key route is the shorter path.

  1. In Okta, open Security, then API, then Tokens, and create a token. Copy it immediately and note its expiry date.
  2. In ServiceNow, go to Connections & Credentials, then Credentials, and create an API Key Credentials record.
  3. Fill in a unique name, tick Active, and enter the token in the format SSWS followed by a space and the token.
  4. Set Applies to (for example, all MID Servers) and an Order value. Lower numbers are tried first, and equal or missing values give a random order.
  5. Under Connection & Credential Aliases, open the Okta record and add a record on the Connections tab. Give it a name, select the credential you just made, and enter your Okta organization URL as the connection URL.

Set up the spoke with OAuth

OAuth takes more steps than the API key route.

In Okta

Create an app integration of type OIDC, then Web Application. Name it, and select these grant types: Authorization Code, Refresh Token, Implicit (Hybrid), Allow ID Token with implicit grant type, and Allow access token with implicit grant type. Set the sign-in and sign-out redirect URIs to the oauth_redirect.do path on your ServiceNow instance. Save the app, then open Okta API Scopes and grant each scope you need.

The scopes the spoke can use are:

Scope Area
okta.users.read, okta.users.manage Users
okta.groups.read, okta.groups.manage Groups
okta.apps.read, okta.apps.manage Applications
okta.logs.read Logs
okta.eventHooks.read, okta.eventHooks.manage Event hooks

In ServiceNow

Open Workflow Studio, go to the Integrations tab and search for Okta with the Outbound tab on. On the Okta spoke tile, select View Details, then Configure. Enter the connection name, the connection URL for your Okta domain, the Okta API version, the Authorization URL, the Token URL and the Token Revocation URL (these sit under the oauth2 path of your Okta domain), plus the client ID and client secret from the Okta app and the OAuth redirect URL. Select Configure and Get OAuth Token. You need to be logged in to Okta at that moment or the token is not granted.

The 49 actions, by category

User management (14)

Activate User starts the process of activating a user at Okta. Clear User Session clears active sessions. Create User creates the specified user, Deactivate User deactivates one, and Delete User deletes the specified user within Okta, which completely removes the user. Is User Account Locked determines whether an account is locked.

Lookup Okta User ID retrieves the Okta user ID for a given Okta login ID. Lookup User Account Details by User ID and Lookup User Profile by User ID each return details for an Okta user ID. Restart User Activation restarts the specified user’s activation. Suspend User changes a user’s status from ACTIVE to SUSPENDED, and Unsuspend User reverses it. Update User Profile changes profile details, and Look up Users Stream retrieves users from Okta based on a filter value.

Password management (6)

Change User’s Password changes the password after validating the current one. Expire User Password expires it, Reset to Temporary Password swaps in a temporary one, and Set User Password sets it directly. Reset User Factors resets all of the multi-factor access devices for the user, and the final action in the category lifts the lock on an account.

Group management (9)

Add User To Group, Create Group, Get Groups, Is User In Group, Lookup Group Details by Group ID, Lookup Group ID By Name, Remove User From Group, Update Group and Look up Groups Stream.

Get Groups retrieves all new and updated groups in Okta. Lookup Group ID By Name returns the group details and group ID for a group name. Look up Groups Stream retrieves groups based on filter criteria.

Group membership management (2)

Look up Group Members Stream retrieves the users in a group. Look up User Groups Stream retrieves the groups a user belongs to.

Application access management (3)

Look up Users by Application ID Stream and Look up Groups by Application ID Stream retrieve the users and groups that have access to an application. Revoke User Application Access revokes a user’s access to an application.

Application management (3)

Look up Applications Stream retrieves applications based on filter criteria. Look up Application by Application ID retrieves the details of one application. Look up App Launcher Applications Stream retrieves applications that are either active or assigned to users.

Logs management (1)

Look up Okta Logs Stream retrieves the logs in Okta that match a given filter value.

Metadata retrieval (4)

Look up Additional Fields for User, Look up Applications Metadata, Look up Event Hooks Metadata and Look up Groups Metadata each retrieve metadata of the named kind from Okta.

Webhook management (7)

Activate Event Hook, Create Event Hook, Deactivate Event Hook, Look up Event Hook by ID, Look up Event Hooks, Update Event Hook and Verify Event Hook. Create Event Hook creates an active event hook, and Verify Event Hook verifies and retrieves an external service endpoint configured for an event hook.

Flows and subflows that come with the spoke

Three draft example flows are included: Add User to Okta Group, Onboard User in Okta (creates and activates an Okta user when a user is created in ServiceNow) and Remove Okta Group Membership on Deactivation.

The spoke also ships subflows. Check Activate Application Event Hook verifies whether an event hook for the application lifecycle activate event exists in Okta. Create or Update Okta Applications Record creates an Okta application record or updates an existing one.

Inbound events from Okta

The spoke can also work in the other direction. The Inbound Integration from Okta to ServiceNow subflow allows inbound integration from Okta to a ServiceNow instance, and it checks for an existing event hook for an application and creates one if none exists.

Conversational subflows and AI agents

With Now Assist for Conversational Spokes in place, the spoke provides eight sample conversational subflows: Expire User Password, Reset to Temporary Password, Look up Group Details, Look up User Profile, Add User to Group, Look up Group Members, Is User in Group and Look up Users by Application. It also provides a Create Group conversational action.

With Now Assist for Integration Hub, seven AI agents cover group, password, group membership, user, application access, application and logs management.

Frequently asked questions

Do I need a subscription to use the Okta spoke?

Yes. An IntegrationHub subscription is required, and the spoke must be activated on the instance.

Can I use API key and OAuth at the same time?

Only one alias can be active at a time for a ServiceNow domain, so set up one method first and get it working.

What format does the API key take?

The token is entered in the API Key field as SSWS followed by a space and the Okta API token.

Which OAuth scopes does the spoke use?

The scopes are okta.users.read and manage, okta.groups.read and manage, okta.apps.read and manage, okta.logs.read, and okta.eventHooks.read and manage. You can grant just the ones your chosen actions need.