Rolling Out AI Company-Wide with Directory Sync - Part 3

Directory sync lets the company's identity provider manage the people in Multi-Router over SCIM. Rules turn directory groups and attributes into organizations, roles and tools policies, and a person deactivated in the directory has their AI tools switched off at once.

Rahul Singh, Founder, Multi-Router 11 min read

From sign-in to access

In Part 2 I talked about single sign-on, which makes the company's identity provider the way people sign in to Multi-Router. Single sign-on decides who can sign in, and each person's organization, role and tools policy are still assigned by an admin.

In this post I want to cover directory sync, which lets the identity provider manage the people in Multi-Router and their access. The identity provider sends people and groups to Multi-Router as they change, and rules turn each directory group or attribute into an organization, a role and one of the tools policies from Part 1. A new hire can set up Claude Code on their first day without an invitation, a person who changes teams moves to their new team's policy once an admin approves it, and a person who leaves has their tools switched off when the identity provider deactivates them.

How directory sync works

Directory sync uses SCIM 2.0, the standard protocol identity providers use to provision people into applications. It connects three things:

Part Role
The directoryThe identity provider pushes people and groups to Multi-Router's SCIM endpoint with a directory token.
RulesEach rule matches people by a pushed group or an attribute such as department, and grants a bundle of access.
ReviewChanges that need a person to decide, such as access that no longer matches any rule, wait in Review.

Directory sync builds on single sign-on and needs an SSO connection that is on, with a verified domain. While it is connected, the directory decides who has access, and SSO signs people in with the access the directory and its rules granted. SSO's new-user access is set to Invite-only for the duration, and returns to its earlier setting when directory sync is turned off.

Connecting the directory

An admin turns on User provisioning on the User provisioning (SCIM) page in Account Settings, chooses what happens when someone new arrives, and saves. Multi-Router then shows two values to copy into the identity provider:

Value Description
SCIM base URLThe account's SCIM address, such as https://api.multi-router.ai/scim/v2/acc_7Tq2Wd9KxP.
Directory tokenThe credential the identity provider sends in the Authorization header. Tokens start with mr_scim_ and work only for their own account's endpoint.

Up to two directory tokens can be enabled at once, so a token can be replaced without a gap: the admin issues a new token, copies it into the identity provider, confirms a successful sync, and then disables the old one. The page lists each token with its first characters, when it was created and when it was last used. A directory token can suspend everyone in the account except the owner, so it is kept in the identity provider and nowhere else.

The connection health panel shows whether the identity provider is reaching Multi-Router. It reads Waiting to hear from your directory until the first request arrives, then shows when the identity provider last made contact and whether that request succeeded. It switches to Directory connection stopped working, with the reason, when a request uses a disabled token or three requests in a row fail. Recent requests lists the latest requests with their method, resource, status and reason.

example-co · acc_7Tq2Wd9KxP

Account Settings

User provisioning (SCIM)

On. Okta can add, update and suspend people in this account.

When someone new arrives

To change this, turn user provisioning off and on again.

Connection health

Okta last contacted us 10/1/2026, 9:42:18 AM

Last request succeeded · 128 recorded · Multi Router keeps the last 500 recorded requests

Refresh status

Endpoint and tokens

Copy this account-scoped URL into your directory provider. A token from another account is refused.

Copy

A directory token can suspend everyone except the account owner. Rule changes do not automatically remove existing access; removals require review.

Up to two tokens can be enabled at once for rotation. Copy the new token into Okta, confirm a sync there, then disable the old one.

Issue token
  • mr_scim_Xq7v••••••••••••••••••••••••••••Copy
    Created 9/14/2026 · Last used 10/1/2026, 9:42:18 AM
    DisableDelete

Notification rules

Send one batched notification when matching directory events occur.

Add notification rule
EventRecipientsStatusActions
Approval neededAll account adminsOn
Turn offEditDelete
Connection failureit-ops@example.com, security@example.comOn
Turn offEditDelete

2 of 20 rules used.

Failed background work

Refresh status

No failed background work.

Recent requests

Refresh history

Use your directory provider’s connector test. No request bodies, person fields, resource IDs, or token details appear here.

  • PATCH Users · 200Request req_Vb7Kq2Xn9TzR4wLp · 10/1/2026, 9:42:18 AM
  • GET Users · 200Request req_H3mPq8Zs1YcN6dFu · 10/1/2026, 9:42:17 AM
  • POST Users · 201Request req_Lw5Rt0Gk7JxB2vQe · 10/1/2026, 9:31:04 AM
  • PATCH Groups · 200Request req_Ce9Nz4Ua6MhW1sKy · 10/1/2026, 9:31:02 AM
Directory sync on for Okta: connection health, the SCIM base URL, a directory token, notification rules and the latest requests from the identity provider.

Identity providers

Any directory that provisions over SCIM 2.0 can connect. The docs have a setup page for each of these:

Identity provider Where provisioning is set up What it sends
OktaA SCIM 2.0 Test App (Header Auth) from Okta's catalog, with Create Users, Update User Attributes and Deactivate Users turned on.The people and groups assigned to the app, and the groups pushed from Push Groups.
Microsoft Entra IDThe Multi-Router enterprise application, with Provisioning Mode set to Automatic.The assigned users and groups, on Entra's provisioning cycle of about 40 minutes. Assigning groups needs Entra ID P1 or P2.
Ping IdentityA SCIM Outbound provisioning connection in PingOne, with bearer token authentication.The users chosen by the connection's provisioning rules, and groups with group provisioning.
JumpCloudThe Identity Management tab of the Multi-Router custom application, with SCIM 2.0 as the API type.The members of the user groups bound to the application, and the groups with group management on.
Other SCIM 2.0 directoriesThe directory's SCIM client, such as OneLogin or a custom script, with the base URL and a bearer token.Users, and groups when group rules are used.

Google Workspace provisions only to applications in its own app catalog. People from Google Workspace sign in through single sign-on, and with Auto-provision they are added on their first sign-in. With every provider, groups are pushed after their members, so each member exists in Multi-Router when the group arrives.

Multi-Router reads each person's username, email, display name and given and family names, their active state, and these job attributes, which rules can match:

Attribute Example
DepartmentEngineering
DivisionProduct
Organizationexample-co
Cost centerCC-4100
TitleAccount Executive
User typeEmployee

Rules

A rule grants access to the people who match it. Each rule has one condition, a pushed group or one of the job attributes above equal to a value, and a bundle of access to grant. Attribute values match regardless of letter case and surrounding spaces. The bundle is the same one an invitation sets:

Grant Values
Account roleAdmin, Member or none.
Organization roleAdmin, Member or none, for each organization.
Portal accessAccess to the Portal with a tools policy, which sets the tools, models and budget the person receives.

The policies from Part 1 map onto rules directly. A rule on the Engineering group makes each member a Member of the Engineering organization and gives them Portal access with the Standard Engineering policy, so they can set up Claude Code and Codex with a $200 monthly cap. A rule on the department Sales and another on the department Marketing give Portal access with the Go-to-Market policy, so those people can set up Claude Desktop with a $40 monthly cap and customer data masked.

People

Everyone in this account

Invite person
PeopleActivityRulesReview2

Rules

Decide what people get when your directory sends them. Every matching rule applies.

Existing access stays when a rule is off.

New rule

Edit rule

Rule nameEngineering
Condition typeGroup
Engineering

Account access

AdminMemberNo Operator Access
Portal accessOff—

Account access applies everywhere outside the organizations below.

Organization access

1 of 2
OrganizationDashboard rolePortal accessPolicy
EngineeringMemberOnStandard Engineering
Add to organization…AddLists every organization in this account.
CancelSave rule
WhenThey getMatchesStatus / actions
EngineeringGroup is EngineeringEngineering · MemberEngineering · Portal · policy selected42 · as of 2h ago
EditPreviewDelete
SalesDepartment is SalesAccount · Portal · policy selected18 · as of 2h ago
EditPreviewDelete
MarketingDepartment is MarketingAccount · Portal · policy selected11 · as of 2h ago
EditPreviewDelete
The Rules tab with the Engineering rule open: members of the Engineering group pushed from Okta become Members of the Engineering organization with Portal access on the Standard Engineering policy, and the Sales and Marketing rules grant Portal access by department.

A person matched by several rules receives every rule's grants together, up to five rules. A person matched by more than five appears in Review until the rules are narrowed. An account holds up to 100 rules, and rules apply to people whose directory record is active. A new or changed rule applies to people as the directory next updates them. To apply it at once to everyone who already matches, an admin turns the rule on, previews it and selects Apply to all, which handles rules that match up to 250 people; a broader rule is split into narrower ones, such as by group.

Rules are retired in two ways. Turning a rule off keeps the access it already granted and stops it granting to new matches. Deleting a rule sends the access it granted to Review, where an admin keeps or removes each grant. Each grant records whether a rule or an admin made it. A rule changes only its own grants, so access an admin granted by hand stays in place when rules change.

Arrival settings and approvals

The arrival setting decides what rules do each time the directory pushes a person, on arrival and on every later update:

Setting Behavior
Apply rules automaticallyMatching rules grant access at once.
Require admin approvalMatching rules create approval requests, and access starts when an admin approves.
Do nothingRules grant nothing, and admins grant access by hand. This is the default.

When a matching rule grants the account Admin role, all of the person's rule access waits for an account admin's approval, whatever the arrival setting. Approvals appear in Review, and an account admin's Apply to all counts as approval. To change the arrival setting while directory sync is on, an admin turns it off and on again.

Review

Review is the queue of directory changes that need a person to decide, on the Review tab of the People page. It holds these items:

Section Arises when Actions
Waiting for your approvalA rule grants the account Admin role, or any grant under Require admin approval.Approve and apply, Decline, or change the proposed access before approving.
Policy changes to reviewA rule would change the tools policy of a person's existing access.Approve the new policy, or keep the current one.
Access that no longer matches a ruleA person leaves a group or changes an attribute, a group is deleted, or a rule is deleted.Keep access, or Remove access.
Directory email changesThe directory changes a person's email.View the person. They keep their Multi-Router email.
Rules that could not runMore than five rules match a person.Fix the rules.

Keep access turns the rule's grant into an admin grant that stays when the rule no longer matches. Remove access removes the grant, and for Portal access it also removes the person's tools with their routers and keys. Review also counts people who arrived with no rule covering them, with a link to them in the roster.

People

Everyone in this account

Invite person
PeopleActivityRulesReview3

Review

Nothing here is applied. Multi-Router never grants account admin or takes away someone's tools on its own.

Waiting for your approval

  • Jordan Leejordan@example.comOkta

    Rule Platform admins would make Jordan Lee an account admin

    Would receive: Account admin · 1 organization grant

    Review request for Jordan Lee

Policy changes to review

  • Marco Ruiz

    marco@example.com

    Sales department changes the tools policy for Marco Ruiz

    Close policy change

    Sales department changes the tools policy for Marco Ruiz

    Agents affected by this change

    • Claude Code · Engineering · 214 recent requests
    Switch to Go-to-MarketKeep Standard Engineering
    Close policy change

Access that no longer matches a rule

  • Marco Ruiz

    marco@example.com

    Review the stale access grant for Marco Ruiz from Engineering group

    Close removal

    Review the stale access grant for Marco Ruiz from Engineering group

    Rule: Engineering group

    Access that no longer matches the rule

    • Engineering · Member · Portal access · policy selected

    Other sources of access

    No overlapping sources reported.

    Recent agent traffic

    • Claude Code · Engineering · 214 recent requests

    Access remains until a decision is made. Removing it can delete an agent’s key and router immediately.

    Keep accessRemove access

Rules that could not run

No rule errors to review.

Directory email changes

No email changes to review.

The Review tab after Marco Ruiz moved from Engineering to Sales in Okta: the Sales department rule's switch to Go-to-Market waits for approval, and the access from the Engineering group rule waits for an admin to keep or remove it.

Notifications

A notification rule sends email when a kind of directory event happens, so admins learn about Review items and connection problems without checking the page. An account holds up to 20 notification rules, and each pairs an event with recipients:

Event Sent when
Approval neededA grant waits for approval.
Person suspendedThe directory suspends a person.
Access no longer matchesAccess stops matching a rule.
Uncovered arrivalA person arrives whom no rule covers.
Rule errorToo many rules match a person.
Connection failureThe directory connection stops working.
Any directory eventAny of the events above.

Recipients are up to 10 email addresses, the admins of the organization the event concerns, or all account admins. Events that happen close together are grouped into one email, sent one minute after the last event or 10 minutes after the first, whichever comes first.

Joining, changing teams and leaving

With directory sync and rules in place, the three common events need no change in Multi-Router. A new engineer is added to the Engineering group in Okta on their first day. Okta pushes them to Multi-Router, the Engineering rule makes them a member of the Engineering organization with the Standard Engineering policy, and on their first sign-in they open the Portal and set up Claude Code with their own key and budget.

When the engineer moves to Sales, Okta removes them from the Engineering group and their department changes to Sales. The Sales rule grants the Go-to-Market policy, and because it changes the tools policy of the person's existing access, it appears in Review for an admin to approve. The Engineering access goes to Review to keep or remove. Once approved, the person's tools follow the Go-to-Market policy.

When the person leaves the company, the identity provider deactivates them and Multi-Router suspends them. Their dashboard and Portal sessions end on their next request, and the routers and keys of every tool they set up from the Portal are disabled, so Claude Code and Claude Desktop stop working on their machines at once. Their history and traffic stay in Multi-Router. Each directory change has this effect:

Directory change Effect in Multi-Router
A person is addedMatched to an existing person by email, or added as Not set up. Rules then apply under the arrival setting.
Name or attributes changeThe person's attributes update, and rules are checked again.
Group membership changesRules are checked again for the person.
Email changesA Review item. The person keeps their Multi-Router email.
A person is deactivatedThe person is suspended: their sessions end, and their tools' routers and keys are disabled.
A person is deletedThe same as deactivation. The person stays in Multi-Router, suspended.
A person is reactivatedA person the directory suspended returns to active, with their routers and keys enabled again.

The Activity tab of the People page records each directory change with the directory as the actor.

M

Marco Ruiz

suspendedmember

marco@example.com

OperatorManaged agentsPortal

Account roster Reactivate Offboard
Access
Operator + agents
Organizations
1 of 2
Agents active
0 of 1
Spend this period
$41.75 / $200
Lifecycle
suspended
Sign-in
SSO linked

Access

Edit
Operator access
On · role member
OrganizationsEngineering· member
Managed agents
On·Portal
Engineering· Standard Engineering

AI agents

Claude CodedisabledEngineering · key …7Qx2 · issued Nov 2, 2026
Set up 12 days ago · router rt_9Hk3Ws7PzQ
$41.75 of $200 this month · $158 left
Rotate keySetup helpTrafficRetire

Policies

Engineering
Standard Engineering
Revision 3 · Claude Code
$200 per agent per month

Activity

Lifecycle events, newest page first.

active → suspendedNov 16, 2026
directory:inactive
Actor: directory
activeNov 2, 2026
Actor: usr_4Rb8Nq2KtV

Identity

Email
marco@example.com
Account role
member
Sign-in
SSO linked
Person ID
per_6Jd3Xv9PmL
User ID
usr_4Rb8Nq2KtV
Created
Nov 2, 2026
Updated
Nov 16, 2026

Budget

Claude CodeMonthly · resets Dec 1
$41.75 of $200$158 left
The person page after the directory suspended Marco Ruiz: the Activity entry records the suspension by the directory, and Claude Code's router and key are disabled until the identity provider reactivates the person.

Safeguards

Directory changes grant access and suspend people, and removing access stays an admin decision:

Safeguard Behavior
Account admin grantsRule access that includes account admin waits for an account admin's approval.
Lost matchesAccess that no longer matches a rule goes to Review, where an admin keeps or removes it.
Account ownerThe directory can suspend anyone in the account except the account owner.
Email changesA changed email in the directory is shown in Review, and the person keeps their Multi-Router email.
Manual suspensionsA person an admin suspended by hand stays suspended when the directory reactivates them, until an admin restores them.
Admin grantsRules leave access granted by an admin as it is.

The SCIM endpoint

The SCIM endpoint implements SCIM 2.0 for Users and Groups, with the discovery resources ServiceProviderConfig, ResourceTypes and Schemas. It supports create, read, replace, PATCH and delete on both, filters with eq on ids, usernames and group names, and paging up to 100 results. Each directory token can make 600 requests per minute, and a request over the limit receives 429 with Retry-After, which identity providers retry on their own. Deleting a user suspends the person and keeps their history. The SCIM Endpoint page in the docs lists every attribute, PATCH path and error.

Next: organizations, roles and lifecycle

Rules grant roles in organizations, and organizations decide which routers, keys and policies a person can see and manage. In Part 4 of this series I'll cover how organizations divide an account, what admins and members can do in each one, and the full lifecycle of a person from invitation to offboarding. The User Provisioning (SCIM) docs cover each identity provider and setting in detail.

Start for free

Create a router, set your SDK base URL to Multi-Router and see the cost of every request.