What directory sync does
With directory sync, your identity provider keeps your organization's member list up to date:
- Someone you assign to ModelRiver in your identity provider becomes a member, before they ever sign in.
- Someone you unassign or deactivate there is removed from your organization, without anyone having to remember.
- Groups you push can set roles, so a person's role follows their team.
Directory sync uses SCIM 2.0, the standard that Okta, Microsoft Entra ID and most other identity providers support. It works alongside single sign-on: single sign-on is how people sign in, and directory sync decides who is a member.
Directory sync is available on Enterprise and other Custom plans. Owners and admins can see the settings; only the owner can change them.
Before you start
Verify your company's email domain under Organization settings, Single sign-on. Your identity provider can only add people whose email address is on a domain you have verified. This is what stops a directory from adding an address your company does not own.
Set up single sign-on as well, so the people your directory adds have a way to sign in.
Turn it on
- Open the organization menu, select Organization settings, then Directory sync.
- Copy the SCIM base URL.
- Select Create token, name it after your identity provider and copy the token. It is shown once.
- Enter the URL and the token in your identity provider (see Provider setup guides).
Directory sync is on as long as your organization has a token. An organization can have two tokens, so you can replace one without a gap: create the second, switch your identity provider to it, then revoke the first.
A token can add, change and remove your organization's members and nothing else. It cannot read prompts, logs, provider keys or API keys. Tokens do not expire, because an expired token would silently stop removing people. Revoke a token when you stop using it.
Adding people
When your identity provider adds someone, they become a member with the role you chose under Role for people the directory adds: Viewer or Editor.
- Their email address must be on one of your verified domains. Anyone else is refused.
- Someone who already has a ModelRiver account with that email address keeps their account, and it is added to your organization. Their name is not changed.
- An account that never confirmed its email address is not added, because anyone could have registered it. The person resets their ModelRiver password, which confirms the address, and your identity provider adds them on its next try.
- Someone who is already a member stays as they are. Their role is not changed unless a group you have mapped applies to them.
- A new member still counts against your plan's member limit. When the limit is reached, your identity provider is told and shows the error.
ModelRiver does not email people your directory adds, and their new account has no password. They sign in with single sign-on, so set that up first.
Removing people
When your identity provider deactivates, unassigns or deletes someone:
- They are removed from your organization straight away. Their next request to any of your projects, logs or settings is refused.
- Their sessions that signed in through your single sign-on end, and so do their open console and CLI connections. If they belong to no other organization, they are signed out everywhere.
- Invitations waiting for them are cancelled.
- They cannot come back another way while directory sync is on. An invitation is refused, and so is joining by signing in with SSO. To let them back in, assign them again in your identity provider.
Only their membership of your organization is removed. Their ModelRiver account, and any other organization they belong to, is not touched.
The organization's owner is never removed or changed by directory sync. If your identity provider tries, the request is refused, and the audit log notes it (once an hour at most, because identity providers repeat the request).
Removing someone yourself on the Team page works as before. If your directory manages that person, they stay out until your identity provider adds them again.
Their API keys
API keys belong to your projects, not to the person who created them, so removing someone does not revoke their keys. Revoking them could stop your production application.
Instead, those keys are listed for review:
- Owners and admins get an email, at most once an hour.
- Organization settings, Directory sync lists them under API keys to review. For each key the owner chooses Revoke or Keep. Admins see the list, and can revoke a key on its project's API keys page.
- On a project's API keys page, such a key is marked Needs review.
If your identity provider adds the person back, their keys are no longer listed.
Roles from groups
Groups your identity provider pushes appear under Roles on the Directory sync page. A group gives no role until the owner maps it to one: Admin, Editor or Viewer.
- A person in several mapped groups gets the highest role.
- A person in no mapped group gets the role for people the directory adds.
- Once a mapped group has applied to someone, their role follows the directory and can no longer be changed on the Team page. The Team page shows where to change it.
- Members no mapped group has ever applied to keep the role you gave them by hand.
- No group can make anyone the owner, and the owner's role never changes.
Mapping a group to Admin makes everyone in it an admin, now and later, so the page asks you to confirm. Removing a mapping, deleting the group or taking someone out of it takes that role away again.
A mapping belongs to the group as your identity provider created it. If the group is deleted and created again with the same name, it has no role until you map it.
Provider setup guides
Okta
In Okta, provisioning is a setting of an app integration.
- Open the app integration your team uses for ModelRiver. On the General tab, under App Settings, select Edit, set Provisioning to SCIM and save.
- If there is no Provisioning setting, the integration does not support it. This is the case for some OpenID Connect integrations. Add a second integration only for provisioning, such as a SWA integration or the SCIM 2.0 Test App (Header Auth) from the Okta catalog, and assign the same people to it.
- On the Provisioning tab, under Integration, select Edit and enter:
| Field | Value |
|---|---|
| SCIM connector base URL | The SCIM base URL from ModelRiver |
| Unique identifier field for users | userName |
| Supported provisioning actions | Push New Users, Push Profile Updates, Push Groups |
| Authentication Mode | HTTP Header |
| Authorization | The token from ModelRiver |
- Under To App, turn on creating users, updating user attributes and deactivating users.
- Make sure the Okta username people are assigned with is their email address.
- Assign people or groups on the Assignments tab. To set roles from groups, push them on the Push Groups tab, then map them in ModelRiver.
Microsoft Entra ID
- In the Entra admin center, open Enterprise applications and select New application, then Create your own application. Choose the option for an application that is not in the gallery.
- Open Provisioning and start a new configuration.
- Enter the SCIM base URL from ModelRiver as the Tenant URL and the token as the secret token, then select Test Connection.
- In the attribute mappings for users, map
userNameto the attribute that holds each person's email address. The default isuserPrincipalName. If that is not their email address in your tenant, mapuserNametomail. - Under Users and groups, assign the people and groups who should have access, and keep the scope on assigned users and groups only.
- Start provisioning.
Entra ID sends changes about every 40 minutes. Use Provision on demand to send one person straight away.
Other providers
Any identity provider that supports SCIM 2.0 with a bearer token works. Give it the SCIM base URL and a token, and send each person's email address as userName.
What is supported
| Resources | Users and Groups |
| Operations | Create, read, replace (PUT), update (PATCH) and delete |
| Filters | userName eq, externalId eq for users; displayName eq, externalId eq for groups |
| Paging | startIndex and count, up to 100 results a page |
| Discovery | /ServiceProviderConfig, /ResourceTypes, /Schemas |
| Rate limit | 3,000 requests a minute for each token |
| Not supported | Bulk operations, sorting, ETags and password sync |
What to know:
- Email addresses can't be changed.
userNameis the person's email address and identifies their account. A request to change it is refused. To move someone to a new address, unassign them and assign them again with the new address. - Names your identity provider sends are stored for the directory record. They become the person's ModelRiver name only when directory sync creates their account.
- Passwords are ignored. People sign in with single sign-on.
- Open playground streams can stay open for up to an hour after someone is removed. No new request can be made.
Turning it off
Revoke every token. Directory sync is then off:
- Your identity provider can no longer add or remove anyone.
- Current members stay as they are, with their current roles.
- People the directory removed can be invited again.
Directory sync is also off while your organization is on a plan that does not include it. Tokens can still be revoked and keys reviewed.
Audit log
The organization audit log records every member directory sync adds or removes, every role it changes, each group mapping, and each token created or revoked. Changes made by your identity provider appear as Directory sync with the token's name, and you can filter the log to them under Who.
Troubleshooting
- "userName must be an email address on a domain this organization has verified in ModelRiver": verify the domain under Single sign-on, or map
userNameto the person's email address. - 401 "Invalid or missing directory sync token": the token was revoked or copied incompletely. Create a new token and enter it again.
- 403 "Directory sync isn't included in this organization's plan": the organization is no longer on Enterprise or another Custom plan.
- 403 "The organization's owner can't be removed or deactivated by the directory": your identity provider tried to remove the owner. Keep the owner assigned.
- 403 "This address already has a ModelRiver account that hasn't confirmed its email address": ask the person to reset their ModelRiver password from the sign-in page. That confirms the address; then assign them again or wait for the next sync.
- 409 "A resource with that name already exists": the person or group already exists. Identity providers handle this themselves by linking to the existing record.
- "userName can't be changed": unassign the person and assign them again with the new address.
- "Your directory removed this person" when inviting: assign them again in your identity provider.
- A role can't be changed on the Team page: it follows a directory group. Change the group's role on the Directory sync page, or the person's groups in your identity provider.