Skip to content
NagentNagent
Log inSign upHire your AI Growth Team
NagentNagent
Log inSign up
All documentation

Directory sync (SCIM)

Let your identity provider (Okta, Microsoft Entra ID, OneLogin, JumpCloud or any SCIM 2.0 provider) add people to your workspace, keep them up to date, remove them when they leave, and set their role from its groups. Set-up steps for each provider.

Browse documentation

What directory sync does

With directory sync (Beta), your identity provider manages who is in your workspace over SCIM 2.0:

  • A person assigned to the app in your provider is added to the workspace, with the role you choose for new people.
  • Name changes in your provider update them here.
  • A person unassigned, suspended or deleted in your provider is deactivated in this workspace at once. Every session they have open in this workspace ends on its next request, on every device, and so do API keys that act as them here. Reassign them and they come back.
  • Groups from your provider can set roles here: map a group to Viewer, Member, Approver or Organisation admin.

It is part of the Enterprise plan, with single sign-on turned on for your workspace by support. On any other plan the Directory sync (SCIM) card under Settings, Sign-in is locked and says what unlocks it. It works with or without a single sign-on connection, but most companies set up both.

Before you start

  1. Be an Organisation admin of the workspace. Only an Organisation admin can make the token or change the roles directory sync gives.
  2. Verify your email domain under Settings, Sign-in, Email domains. Directory sync adds only addresses at your verified domains.
  3. Choose who stays in charge if the directory goes wrong. Emergency admins (under Single sign-on) and your last Organisation admin are never deactivated or demoted by directory sync.

Set it up

  1. Open Settings, Sign-in, and find Directory sync (SCIM).
  2. Copy the SCIM base URL. Your provider may call it the tenant URL or the SCIM connector base URL.
  3. Press Make token and copy the bearer token straight away. It is shown once. We keep only a fingerprint of it, so nobody, us included, can show it to you again.
  4. Paste both into your provider, using the steps for it below.
  5. Choose the role for people your provider adds: Viewer (the default), Member or Approver. Admin roles are never given this way.
  6. Optional: under Group roles, map your provider's groups to roles. Push the groups from your provider first, then pick each one from the list.

Make a new token replaces the old one, which stops working at once, so paste the new one into your provider straight away. Revoke token stops directory sync until you make a new one.

Okta

  1. In the Okta Admin Console, open Applications, then the app you use for single sign-on (or create an app integration for this workspace).
  2. Under General, App Settings, press Edit, set Provisioning to SCIM and save.
  3. Open the Provisioning tab, Integration, and press Edit:
    • SCIM connector base URL: the SCIM base URL from the card.
    • Unique identifier field for users: userName.
    • Supported provisioning actions: Push New Users, Push Profile Updates and Push Groups.
    • Authentication Mode: HTTP Header, and paste the token as the bearer token.
  4. Press Test Connector Configuration, then Save.
  5. Under Provisioning, To App, enable Create Users, Update User Attributes and Deactivate Users.
  6. Assign people or groups under Assignments. To use group roles, add the groups under Push Groups.

Microsoft Entra ID

  1. In the Microsoft Entra admin center, open Enterprise applications, then the app you use for single sign-on (or a new non-gallery app).
  2. Open Provisioning and set the provisioning mode to Automatic.
  3. Under Admin Credentials, paste the SCIM base URL as the Tenant URL and the token as the Secret Token, then press Test Connection and save.
  4. Under Mappings, keep users and groups on. Map userPrincipalName or mail to userName, whichever holds the person's work email.
  5. Under Settings, set Scope to sync only assigned users and groups, and turn Provisioning Status on.
  6. Assign people or groups to the app under Users and groups. Entra runs a cycle about every 40 minutes; Provision on demand tests one person at once.

OneLogin

  1. In OneLogin, open Applications and add the SCIM Provisioner with SAML (SCIM v2 Enterprise) app, or open your SCIM-enabled app.
  2. Under Configuration, paste the SCIM base URL as SCIM Base URL and the token as SCIM Bearer Token, then press Enable next to API Connection.
  3. Under Provisioning, tick Enable provisioning. Choose what happens when a user is deleted or suspended: either deactivates them here.
  4. Under Parameters, include Groups in provisioning to use group roles.
  5. Assign people to the app under Users.

JumpCloud

  1. In the JumpCloud Admin Portal, open SSO Applications, then the app you use for single sign-on.
  2. Open the Identity Management tab and choose SCIM 2.0.
  3. Paste the SCIM base URL as the Base URL and the token as the Token Key, then press Test Connection and Activate.
  4. Bind user groups to the app. Their members are added here, and the groups are sent too, for group roles.

Google Workspace

Google Workspace provisions automatically only to apps in its own catalogue, not to a custom SAML app, so it cannot send people here by SCIM today. With Google Workspace, use single sign-on (people at your verified domains get an account on their first sign-in, with the role you chose) and remove people under Settings, Team. A directory tool that syncs Google Workspace to a SCIM 2.0 app can also call the SCIM base URL with the token.

Group roles

Pick a group your provider has already sent from the list. The mapping stays with that group: if your provider renames it, it keeps its role, and a new group with the old name gets nothing. A group not sent yet can be mapped by its name as your provider shows it (capitals do not matter), to any role but Organisation admin. Then:

  • Someone in several mapped groups gets the highest of their roles.
  • Someone who leaves every mapped group goes back to the role for new people, if their role came from directory sync.
  • A role an admin set by hand is raised by a mapped group, but never lowered. To hand someone's role to the directory, set it by hand to the group's role once.
  • Mapping a group to Organisation admin is a choice you confirm in the card: everyone in that group becomes an admin. It needs a group your provider has already sent.
  • Only an Organisation admin can change the role for new people or any mapping.
  • Platform staff roles can never be given by a group.

Saving the mappings applies them at once to everyone directory sync has already added.

The welcome email

When directory sync adds someone, as a new account or by bringing in someone you had invited, they get one email saying they were added to your workspace and that they sign in at the sign-in page with your company sign-in. It has no password and no sign-in link. Each person gets it once for your workspace. Turn it off with Email each person your provider adds in the Directory sync card.

What the endpoint supports

  • Filters: eq, co, sw and pr, gt, ge, lt and le on meta.created and meta.lastModified, joined with and, or and brackets. Users filter by userName, emails, externalId, displayName, name.givenName, name.familyName and id; groups by displayName, externalId and id.
  • Sorting: sortBy on userName, displayName, meta.created or meta.lastModified, with sortOrder ascending or descending.
  • ETags: each resource has a version. Send it as If-Match on a change and a resource that changed since you read it answers 412.
  • Bulk: up to 100 operations and 1 MB per request, with bulkId references and failOnErrors. Each operation runs on its own, with the same protections as a single request.
  • Schemas at /Schemas, trimmed to what is kept here.

What directory sync never does

  • It never joins an account that belongs to another workspace, or an address outside your verified domains.
  • It never deactivates or demotes an emergency admin or the last Organisation admin. The provider gets an error, and the refusal is in your audit log.
  • It never changes a person's email address. Change the address in your provider back, or remove the person and add the new address.
  • It never deletes an account. It ends the person's membership of this workspace only. If they belong to other workspaces, those are untouched.

Messages your provider may show

MessageWhat it meansWhat to do
The bearer token is not valid for this addressWrong, old or revoked token, or the wrong base URLMake a new token and paste both again
Directory sync comes with the Enterprise planThe plan or support's switch is offAsk support
This address is not at one of the workspace's verified email domainsThe person's email is at another domainVerify the domain, or leave them out
This email already has an account outside this workspaceThe address belongs to another workspace's accountInvite it from Settings, Team
This person is already a member of this workspaceYour provider created someone who is hereLet your provider match by userName
An admin removed this person from the workspaceRemoved by hand, not by directory syncAdd them back from Settings, Team
This person is an emergency admin of this workspaceThey are protectedRemove them as an emergency admin first
This person is the last Organisation admin of this workspaceThey are protectedMake someone else an Organisation admin first
The workspace has no open seat on its planNo seat for a new personFree a seat or change plan
Another change to this workspace is in progressTwo changes arrived at once; they run one at a timeYour provider retries on its own
Too many requestsYour provider sent too many at once, or too many wrong tokens came from one addressWait and retry; check the token

Every change directory sync makes, and every one it refuses, is in your workspace's audit log under the actor directory-sync.