Sync Okta groups with user groups via REST

Recipe ToolsMarketingWorkatoIdentity ManagementDeveloper ToolAPI Integration

What it does

When the clock triggers every 5 minutes, this automation retrieves Okta groups and their members, then syncs each user to the matching user group via REST calls. Someone stays in sync across systems without manual updates.

Who it's for

IT teams who need Okta group membership to match user groups in another system automatically.

How teams use this

Keep Okta and user groups aligned

Run the sync every 5 minutes so when someone joins or leaves an Okta group, they are added to or removed from the matching user group automatically. No manual group management is needed.

Sync to a different user group system

Point the REST calls to a different user group platform instead of the current one. The Okta retrieval and sync logic stay the same, only the target system changes.

Filter groups by a naming pattern

Add a condition to only sync Okta groups that match a specific name pattern, so sensitive groups are excluded from the sync. The rest of the flow remains unchanged.

Notify on sync failures

Include a step to send a Slack message when someone cannot be added to or removed from a group, so the team knows when manual intervention is needed.

How it works

  1. Check for changes every 5 minutes. The automation runs on a 5-minute schedule to keep group membership in sync between Okta and the user group system.
  2. Retrieve Okta groups and members. Fetch all groups by name from Okta, then retrieve the list of members in each group so the automation knows who belongs where.
  3. Get user details and current groups. Look up each user by email via REST HTTP call to find their user ID, then list all user groups they belong to in the target system.
  4. Add or remove users from groups. Add users to matching user groups or remove them if they no longer belong in Okta, keeping both systems aligned via REST calls.
  5. Log sync results. Record the outcome of each sync operation to the job report so the team can audit what changed and troubleshoot failures.