How user provisioning works
What happens when you sync identity provider users and groups as members and teams, dry runs and runs, scheduled sync, following user status, the removal threshold, and reading run results.
LDAP is also supported. See LDAP user provisioning for access-group and Team search scopes.
User provisioning syncs the users and groups of your identity provider into AI Gateway members and teams. It is available to organizations whose auth provider is Okta, Keycloak or LDAP; Google Workspace is not supported. This page covers the behavior and steps supported providers share. For provider-side preparation and connection settings, follow the Okta and Keycloak pages. With Okta you can also use SCIM provisioning, where Okta pushes changes instead of the runs on this page.
Only administrators with user management permission see this feature’s menu.
What a sync does
Section titled “What a sync does”A sync reads the users and groups that are assigned in the identity provider: for Okta, the users and groups assigned to the application used for sign-in; for Keycloak, the users and groups that hold a role of the sign-in client. It only touches members who sign in with that provider.
| In the identity provider | In AI Gateway |
|---|---|
| Assigned and not yet a member | Becomes a member, before the user ever signs in |
| An assigned user’s name or email changed | The name and email are updated |
An assigned user is suspended (suspended in Okta, Enabled off in Keycloak) | The member is deactivated (when following user status is on) |
| The suspension is lifted | The member is activated again (same setting) |
| The assignment is gone (unassigned or deactivated in Okta; last role revoked or user deleted in Keycloak) | The member is removed |
| An assigned group | A team is created for each group, and its members follow the group’s members |
| The group’s assignment is gone | That team is removed |
A sync grants no permissions. New members and new teams have no roles. Before a new member can use the gateway they need a seat and a project role, given the same way as in Automatic member registration.
Changes that cannot be undone
Section titled “Changes that cannot be undone”- Removing a member also deletes the member’s roles, team memberships, Gateway Keys, MCP credentials and the Toolsets they created, and releases their seat. If the user is assigned again they come back as a new member with no permissions; the old roles and keys do not return.
- Removing a team also deletes the team’s roles and team memberships. User accounts stay. If the group is assigned again, a new team with no roles is created.
Deactivation
Section titled “Deactivation”Deactivation can be undone. A deactivated member’s open sessions end and their Gateway Key calls are refused, but their roles and Gateway Keys are kept.
Deactivation also releases the member’s seat, and activating the member again does not give it back. With a license that counts seats, assign a seat again under Organization → Members before the member can use their roles and keys again.
Run a sync
Section titled “Run a sync”In the admin console, open Organization → Auth providers, open the actions menu on the active card, and choose Manage provisioning. The User provisioning page opens. For the connection settings, follow the provider page.
1. Save the settings
Section titled “1. Save the settings”| Field | What to enter |
|---|---|
| Enable scheduled sync | Decide in 4. Turn on scheduled sync. Leave it off at first and check a dry run |
| Removal threshold (%) | The default is 100%, which stops no run. Read Removal threshold; lowering it is recommended |
| Following user status (Follow Okta user status, Follow Keycloak user status) | On by default. Read Following user status before deciding |
Click Save settings. The dry run and the sync below always use the saved settings, so save first if you changed anything.
2. Preview with a dry run
Section titled “2. Preview with a dry run”Run dry run changes nothing and shows, as the Dry run result, what a sync would change. It also checks that the connection settings work.
- If Removed, Deactivated, Teams removed or Team memberships removed is not zero, find the targets in the tables below.
- In the user table (Email, Action, Active afterwards), removals are listed first. In Active afterwards, look for unexpected Active values. When following user status is on, members an administrator deactivated are activated here too.
- In the team table and the team member table, check which teams would be removed and which members would leave.
A dry run result is not kept in the run history. It disappears when you reload the page, save the settings, or run a sync.
3. Run the sync now
Section titled “3. Run the sync now”Run sync now opens Run the sync now? with the counts from the last dry run. When something will be removed, the button changes to Run and remove members, Run and remove teams, or Run and remove members and teams. Without a usable dry run result, a warning says that the members and teams to be removed are unknown.
The run continues on the server, and its progress appears in Run history. A run takes at most 10 minutes, and only one run goes at a time.
4. Turn on scheduled sync
Section titled “4. Turn on scheduled sync”Select Enable scheduled sync to show Schedule (cron) and Time zone. Fill them in and click Save settings. The Common schedules buttons (Every 30 minutes, Every hour, Every day) fill in the schedule. The default is every day at 00:00 UTC.
The schedule has five fields: minute, hour, day of month, month, day of week. Pick the time
zone, such as Asia/Seoul, from the list.
| When | Schedule (cron) | Time zone |
|---|---|---|
| Every day at 06:00 Seoul time | 0 6 * * * | Asia/Seoul |
| Weekdays at 06:30 Seoul time | 30 6 * * 1-5 | Asia/Seoul |
| Every hour | 0 * * * * | UTC |
| Every 15 minutes | */15 * * * * | UTC |
- Intervals shorter than 5 minutes, six-field expressions with seconds, and shorthands such as
@dailyare not accepted. - Saving does not start a run; runs start at the next scheduled time. To sync right away, click Run sync now.
Following user status
Section titled “Following user status”| Setting | Assigned user suspended in the identity provider | Other assigned users | Member an administrator deactivated |
|---|---|---|---|
| On (default) | Deactivated | Activated | Activated again at the next run unless suspended in the identity provider |
| Off | Unchanged | Unchanged | Stays inactive |
With the setting on, the identity provider decides whether a member is active. Suspend someone on leave in the identity provider and the next run deactivates them; lift the suspension and the next run activates them again. Assign a seat again before they use the gateway (see Deactivation). With the setting off, the Gateway Keys of suspended users keep working. Turning the setting off leaves members that are already inactive as they are.
Before you turn it on:
- The first run can activate inactive members. If the dry run shows an unexpected Active, suspend that user in the identity provider or turn this setting off before you run.
- Suspending many users at once deactivates all of them at the next run. The removal threshold does not stop deactivation. If it was a mistake, lift the suspensions and click Run sync now to restore them, then assign the released seats again.
- The organization’s last active administrator is never deactivated. If that administrator is suspended, every run ends as Partially succeeded with “Skipped because it would leave the organization without an active administrator.” Make someone else an active administrator first. With a license that counts seats, that administrator also needs a seat. If a dry run shows Removed for one administrator and Deactivated for another, do not run it: the administrator who stays cannot sign in to the identity provider, so nobody is left to manage the organization.
Removal threshold
Section titled “Removal threshold”When a run would remove a larger share of members than this threshold, it changes nothing and ends as Failed. The share is counted against the members who sign in with that provider, including inactive ones. When wrong connection settings make the provider’s result empty, every member becomes a removal target; the threshold is there to stop that.
At the default of 100%, a run goes ahead even when the result is empty. Set it a little above the share you would normally expect to remove at once. With few members the percentage is coarse: with 4 members, 10% stops any run that removes even one member, and 25% allows one.
The threshold applies only to member removals. It does not stop team removals or deactivations, so check the team table of a dry run before you unassign many groups at once.
Groups and teams
Section titled “Groups and teams”Each assigned group becomes one team, shown with the identity provider’s name in the Source column of the Teams page. The team is named after the group name in Okta and after the group path in Keycloak. There is no setting to choose groups; remove a group’s assignment in the identity provider if you do not want it as a team.
| Situation | Result |
|---|---|
| The group is renamed | The team is renamed. Its members and roles stay |
| The group’s assignment is removed | The team is removed with its roles and team memberships. This cannot be undone |
| A manual team with the same name exists | A separate team with the same name is created. The manual team is not changed |
| A group member is not assigned | Ignored. Only assigned users can be team members |
| A member signs in with another method | The sync never takes that member out of a team |
Because these teams follow the identity provider’s groups, what you can change in the console is limited:
- You cannot rename or delete them. Change the group in the identity provider.
- You cannot add or remove members who sign in with that provider. Change the group’s members and the next run applies it.
- You can give them roles like any other team.
Giving such a team the organization administrator role makes every member of that group an organization administrator. Keep in mind that whoever manages that group in the identity provider then decides who administers AI Gateway.
If you stop using the sync, the teams it created keep their members and roles, and they still cannot be renamed or deleted in the console.
Read the run results
Section titled “Read the run results”Run history shows each run’s Started time, Trigger (Manual or Scheduled), Counts and Status. Click Details to open Run details, which shows each step and the skipped users and teams. The latest 50 runs are listed, and runs are kept for 90 days.
| Status | Meaning |
|---|---|
| Running | The run is in progress |
| Succeeded | Every change was applied |
| Partially succeeded | Some users or teams were skipped; the rest were applied. Check the reasons in Run details |
| Failed | Nothing was changed. Fix the cause and run again |
| Aborted | The run passed the 10-minute limit or the server stopped during the run. Changes applied up to then stay; run again to finish |
A scheduled run that fails is not retried before the next scheduled time; after you fix the cause, click Run sync now.
Reasons a user or team was skipped
Section titled “Reasons a user or team was skipped”| Reason | What to do |
|---|---|
| The directory user has no email. | Add an email to the user’s profile in the identity provider. An existing member still gets their suspended or active status; a user who is not yet a member is not registered |
| Skipped because it would leave the organization without an active administrator. | Give someone else the organization administrator role first |
| This sync skips the user, so the Team membership is left as it is. | Fix the reason that user was skipped in the same run. Until then every run ends as Partially succeeded |
| The change would leave the organization without an active administrator. | A team with the organization administrator role would be removed, or the last administrator would leave it. Make someone else an active administrator first |
| Could not apply the change to this user. / Could not apply the change. | The next run tries again. If it keeps happening, contact support |
Troubleshooting
Section titled “Troubleshooting”For connection problems (rejected credentials, application or client not found, directory not readable, rate limiting), see the Okta and Keycloak pages.
| Symptom | What to check |
|---|---|
| A dry run plans to remove every member, or a run stops without changes because of the removal threshold | Check on the provider page that the connection settings point to the application or client used for sign-in. Do not raise the threshold to get past it |
| User provisioning is not available for the active auth provider. | The auth provider is neither Okta nor Keycloak. If scheduled sync is still on, turn it off with Turn off scheduled sync on the page. Left on, each scheduled time fails to start a run and leaves nothing in the run history |
| No response was received, so it is unknown whether the run started. | Check the run history. A run that started is listed there |
Good to know
Section titled “Good to know”- Changes in the identity provider take effect at the next run. With the default schedule that can take up to a day. To apply a suspension or unassignment right away, click Run sync now, or release the member’s seat first.
- Removing a member does not end their open sessions, but their requests are refused because they no longer have permissions. Deactivation ends open sessions immediately.