SCIM group mappings are available for organizations on Enterprise plans and require an active SSO connection.
Prerequisites
- Your organization must be on an Enterprise plan
- You must be an organization admin
- Your organization must have an active SSO connection (see Single Sign-On (SSO))
- SCIM provisioning must be enabled for your organization (see Set Up Provisioning), and your identity provider must push groups to OpenRouter through it
Set Up Provisioning
Provisioning connects your identity provider’s SCIM client to a SCIM directory on your OpenRouter organization. Organization admins can create that directory from the SCIM Mappings tab without contacting support. Activation requires a verified email address on your OpenRouter account; you are prompted to verify it if needed.1
Open the SCIM Mappings tab
While in your organization context, navigate to Settings > Members and select the SCIM Mappings tab. When your organization has an active SSO connection and no directory yet, the tab shows Enable SCIM provisioning.
2
Choose your identity provider
Click Enable SCIM provisioning and choose Okta, Microsoft Entra ID, or Custom (SCIM 2.0) for any other SCIM 2.0 client.
3
Enter your admin group ID
Enter the ID of the group in your identity provider whose members should be OpenRouter organization admins, and optionally its display name. This mapping is created together with the directory so the organization has an admin mapping from the very first sync: group role mappings are applied on every push, and a directory with no admin mapping would leave the organization without an admin. Make sure your own account is a member of that group in your identity provider — OpenRouter cannot verify group membership before the first push, and the sync applies roles exactly as your identity provider reports them. You can add or change organization role mappings later from the same tab.
4
Copy the endpoint URL and API key
After activation, OpenRouter shows the SCIM endpoint URL and a bearer API key. The key is shown only once. Store it in your identity provider now; if you lose it, rotate the key to get a new one.
Configuring Your Identity Provider
Use the values from the last step as the SCIM 2.0 base URL and bearer token in your identity provider’s provisioning settings, then assign the users and push the groups you want to sync. Make sure the admin group you entered during activation is among the groups you push.- Okta: in your OpenRouter SAML app, open the Provisioning tab, choose SCIM integration, and enter the endpoint URL as the SCIM connector base URL with HTTP Header authentication using the API key. Enable Create Users, Update User Attributes, and Deactivate Users, assign users to the app, then use Push Groups to push your groups.
- Microsoft Entra ID: in your OpenRouter enterprise application, open Provisioning, set the mode to Automatic, and enter the endpoint URL as the Tenant URL and the API key as the Secret Token. Test the connection, assign users and groups to the application, and turn provisioning on.
- Custom (SCIM 2.0): point your SCIM client at the endpoint URL with
Authorization: Bearer <API key>and push users and groups.
Rotating the API Key
If the API key is lost or needs to be replaced, click Rotate API key on the SCIM provisioning card at the top of the SCIM Mappings tab and confirm. A new key is generated and shown once; update it in your identity provider promptly. The previous key keeps working only for a short grace period, after which provisioning stops until the new key is in place. Rotations are recorded in the audit log.Viewing Your Groups
While in your organization context, navigate to Settings > Members and select the SCIM Mappings tab. Groups pushed by your identity provider appear here as cards, each showing the group name and how many workspaces it’s mapped to. You can:- Filter groups by all / mapped / unmapped
- Refresh from IdP to pull the latest groups on demand (the “Last synced” timestamp shows when groups were last refreshed)
- View audit log to see a history of mapping and membership changes
Creating a Mapping
1
Find the group
Locate the group card you want to map (use the unmapped filter to see groups without any mappings).
2
Add a mapping
Click Add mapping, then choose a workspace and a role, either Member or Admin. The role defaults to Member (or Admin, for groups whose name contains “admin”).
3
Confirm
Click Add mapping to save. Everyone in the group is granted the chosen role in that workspace.
How Membership Sync Works
- Joining a group: when someone is added to a mapped group in your identity provider, they’re automatically added to the mapped workspaces with the mapping’s role.
- Leaving a group: when someone is removed from a mapped group, workspace access granted by that mapping is removed as well.
- Multiple groups: if a member belongs to several groups mapped to the same workspace, they get the highest role across those mappings (Admin wins over Member).
- Deactivation or deletion: when someone is deactivated or deleted in your identity provider, their organization membership and the API keys they created in the organization are deactivated. See User Deactivation and Deletion.
- Identity provider IDs: List organization members returns each member’s user ID at your identity provider as
external_id, so you can match OpenRouter members to your directory. Your identity provider sends it when the member signs in through your SSO connection, in the user ID attribute that connection reads (in Okta, an attribute statementidwith the expressionuser.id; for other identity providers, contact support@openrouter.ai). The value appears once OpenRouter syncs the member after that sign-in; Refresh from IdP syncs existing members. It isnullfor members your directory didn’t provision, for members who haven’t signed in through SSO since your identity provider started sending it, and for members not yet synced. A refresh that can’t read your directory leaves the stored values unchanged, so run it again if values are still missing; if a member who has signed in through SSO still has no value, contact support.
Changing a Mapping’s Role
Use the role selector on any mapping row to switch between Member and Admin. Existing members provisioned by the mapping are updated to their new effective role. Highest role still wins: a member who also gets Admin from another mapped group keeps Admin even if you lower this mapping to Member.Removing a Mapping
Click the delete button on a mapping row. Because members may have been added to the workspace by this mapping, you’ll be asked what should happen to them:- Keep members: the mapping is removed, and current members of the group stay in the workspace as manually managed members, so group changes in your identity provider no longer affect them. They keep Admin only if the deleted mapping’s role was also Admin; otherwise they become Members. SCIM-managed members who are no longer in the group, or whose group was deleted in your identity provider, are removed.
- Remove members: the mapping is removed, and members whose access came from this mapping are removed from the workspace
Managing Mappings with the Management API
You can manage groups, workspace mappings, organization role mappings, and refreshes from your identity provider with an organization-scoped Management API key; a workspace-scoped key gets403. Enabling provisioning, rotating the SCIM API key, and turning on organization role mapping stay in the dashboard. All routes live under https://openrouter.ai/api/v1/scim:
GET /groups and GET /group-mappings are paginated with offset and limit (default 50, maximum 100), and every list returns total_count. Mapping changes made with the API appear in the audit log with the API key that made them.
Find a Group
List SCIM groups to get theid of a group. Filter by exact display_name or by external_id, the group’s ID at your identity provider (such as its Entra ID object ID):
Create a Mapping
Create a SCIM group mapping with the group’sid, the workspace ID, and a role of member or admin. Everyone in the group is granted the role in that workspace, as with Creating a Mapping in the dashboard.
data.id is the mapping ID used by the other mapping routes. Creating a mapping that already exists with the same role succeeds and re-applies it to the group’s members, as long as the key also has scim:view; without it, the retry returns 409. Asking for a different role returns 409, so change the role instead.
List and Read Mappings
List SCIM group mappings returns every mapping with itsid, scim_group_id, workspace_id and role. Get a SCIM group mapping returns one.
Change a Mapping’s Role
Update the SCIM group mapping with the newrole. Members are updated to their new effective role, and the highest role still wins.
Remove a Mapping
Delete the SCIM group mapping. The requiredkeep_members query parameter makes the same choice as Removing a Mapping in the dashboard:
keep_members=true: Keep memberskeep_members=false: Remove members
keep_members has no default. A request without it returns 400, so members are never removed by accident.
404 if the mapping doesn’t exist in your organization. If the mapping has guardrail policies attached, it returns 403 unless the key also has guardrails:update and SCIM group policies are turned on for your organization, in which case the policies are removed along with the mapping.
Map Groups to Organization Roles
Organization role mappings set a member’s organization role (admin or member) from their groups, like the admin group you choose when you set up provisioning. Turn on Set organization roles from groups in SCIM settings on the SCIM Mappings tab first; until then, creating or deleting an organization role mapping returns 409. List SCIM organization role mappings shows whether it is on in role_mapping_enabled.
precedence wins.
Create a SCIM organization role mapping to map a group. Its members get the role on the next sync from your identity provider.
id. Deleting the last admin mapping returns 409, so the organization always has a group that grants Admin.
Refresh Groups from Your Identity Provider
Start a SCIM directory sync to do what Refresh from IdP does. The request returns202 with the job and a Location header to poll. If a sync is already running, you get that job instead of a new one; reading it needs scim:view, otherwise the request returns 403.
status is succeeded or failed. A succeeded job reports synced_groups and deleted_groups. A failed job’s error_message is a message code for the failure. A succeeded job can also have an error_message of external_ids_not_stored or external_ids_partially_stored: its groups synced, but some or all members’ identity-provider IDs weren’t saved, so check it if you rely on those IDs.
Audit Log
Every change made through SCIM mappings is recorded. Click View audit log on the SCIM Mappings tab to see:- SCIM provisioning enabled and API key rotations, with the admin who made the change
- Mappings created, role changes, and deletions, with the admin who made the change
- Members added to, removed from, or changed in workspaces, including changes triggered automatically by your identity provider
- Organization API keys and management keys created, with who created each one (a member, an API key, a Connect partner, or an automated process) and its owner. Keys created before API key creation was added to the audit log have no entry.
Frequently Asked Questions
Why don't I see the SCIM Mappings tab?
Why don't I see the SCIM Mappings tab?
The tab is available to organization admins on Enterprise plans. If you’re on an Enterprise plan and still don’t see it, contact support@openrouter.ai.
Why is my group list empty?
Why is my group list empty?
Groups appear once your identity provider pushes them via SCIM provisioning. Check that provisioning is set up and that your IdP’s provisioning configuration pushes groups, then click Refresh from IdP. You also need an active SSO connection.
I lost the SCIM API key. Can I see it again?
I lost the SCIM API key. Can I see it again?
No. The key is shown once, at activation or rotation. Rotate the API key to get a new one and update it in your identity provider.
Can I map one group to multiple workspaces?
Can I map one group to multiple workspaces?
Yes. Add as many mappings as you need on a group’s card. Each workspace can have its own role for that group.
What happens if a group is deleted in my identity provider?
What happens if a group is deleted in my identity provider?
Once the deletion syncs (automatically, or via Refresh from IdP), the group is deactivated on OpenRouter and stops granting access through its mappings. Members who aren’t entitled through another mapped group lose the access it granted, and the removals are recorded in the audit log.
Do mappings replace manual workspace membership?
Do mappings replace manual workspace membership?
No. Mappings work alongside manually managed members. Manually added members are unaffected by mapping changes.
Getting Help
- Setup assistance: Email support@openrouter.ai
- Enterprise plans: Contact our sales team to enable SCIM group mappings for your organization
- More than one active SSO connection: Self-serve activation requires a single active SSO connection; contact support to enable provisioning on the right one