> For the complete documentation index, see [llms.txt](https://docs.orkestra.online/orkestra-online/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.orkestra.online/orkestra-online/administration/azure-active-directory/automatic-user-provisioning-scim.md). Agents can also search and read this documentation through its [MCP server](https://docs.orkestra.online/orkestra-online/~gitbook/mcp).

# Automatic user provisioning (SCIM)

With SCIM provisioning, Microsoft Entra ID keeps your Orkestra users and groups in sync for you:

* **People you assign** to your Orkestra app in Entra get an Orkestra account automatically.
* **Name changes** in Entra are applied in Orkestra, and so are email changes for accounts Entra created (see the table below).
* **People you unassign or disable** in Entra are removed from your Orkestra organization: their access, API keys and seat are released, and an Orkestra session they already have open ends within 24 hours.
* **Groups you assign** are created in Orkestra with their members. Workspace access you grant to the group applies to its members, and follows membership changes in Entra (this needs the Graph permission in *Before you start*).

## Before you start

* Single sign-on must already work for your organization (see [Enable SSO for WebApp](https://docs.orkestra.online/orkestra-online/administration/azure-active-directory/enable-sso-for-webapp.md)). SCIM users activate their account the first time they sign in with SSO.
* You need to be an administrator of your Orkestra organization, and an Entra administrator who can configure enterprise applications.
* To give workspace access through groups, the app registration used for Orkestra SSO needs a Microsoft Graph application permission that can read groups (for example `Group.Read.All`, with admin consent). Without it, Entra still provisions the groups and their members, but you cannot grant those groups access to workspaces.
* Assigning groups (not only users) to an application requires Microsoft Entra ID P1 or P2. Entra provisions the direct members of an assigned group, not the members of nested groups.

## 1. Create the SCIM token in Orkestra

1. In Orkestra, open **SSO Console**. Under **SCIM provisioning**, copy the **Tenant URL** (`https://api.orkestra.online/prod/scim/v2`), then choose **Create token**.

   ![The SCIM provisioning card in the SSO Console, before a token exists](https://705252832-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6wDJF-clP9xeoy68-u%2Fuploads%2FSUjgop5BBu5L5EysIei5%2Fscim-01-orkestra-create-token-v2.png?alt=media)
2. Copy the **token** now: Orkestra shows it only once.

   ![The SCIM token, shown once](https://705252832-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6wDJF-clP9xeoy68-u%2Fuploads%2FiZ09JhjEuuuumJyyOxee%2Fscim-02-orkestra-token-once.png?alt=media)
3. The card now says SCIM is **On**, with the start and end of the token and when Entra last used it.

   ![The SCIM provisioning card with SCIM on](https://705252832-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6wDJF-clP9xeoy68-u%2Fuploads%2FDwywRdNVl3EhCm37kLN2%2Fscim-03-orkestra-scim-on-v2.png?alt=media)

**Regenerate token** replaces the token: the old one stops working immediately, so paste the new one in Entra. **Turn off** revokes the token, and Entra can no longer change anything in Orkestra.

## 2. Connect Entra to Orkestra

1. In the Microsoft Entra admin center, go to **Enterprise apps**, open your Orkestra application (the one you use for SSO), then **Provisioning**.

   ![The Orkestra enterprise application, with Provisioning in its menu](https://705252832-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6wDJF-clP9xeoy68-u%2Fuploads%2FqslehYndqyn8SuaQLN2C%2Fscim-04-entra-app-provisioning-menu.png?alt=media)
2. Choose **Connect your application**.

   ![Get started with application provisioning](https://705252832-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6wDJF-clP9xeoy68-u%2Fuploads%2FJNDjupFDOfydXE2hhUan%2Fscim-05-entra-connect-your-application.png?alt=media)
3. Keep **Bearer authentication**, paste the **Tenant URL** and the **Secret token** from step 1, then choose **Test connection**. Entra confirms that the connection test was successful. Choose **Create**.

   ![Admin credentials, with a successful connection test](https://705252832-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6wDJF-clP9xeoy68-u%2Fuploads%2Fz1ibCXt3UyDtZ4JJhvOz%2Fscim-06-entra-admin-credentials.png?alt=media)
4. Entra opens the provisioning overview. Provisioning stays paused until you start it in step 4.

   ![The provisioning overview, initial sync paused](https://705252832-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6wDJF-clP9xeoy68-u%2Fuploads%2Ff5XnD1jZBYS5aj8hTd9I%2Fscim-07-entra-provisioning-overview.png?alt=media)

If your tenant shows the older provisioning page instead, set **Provisioning Mode** to **Automatic**, fill **Tenant URL** and **Secret Token** under **Admin Credentials**, choose **Test Connection**, then **Save**.

## 3. Check the attribute mapping

Open **Attribute mapping** and keep the defaults. Orkestra uses these attributes and ignores the others (job title, phone numbers, address...):

* **Users**: `userPrincipalName` → `userName`, `mail` → `emails[type eq "work"].value`, `givenName` → `name.givenName`, `surname` → `name.familyName`, `mailNickname` → `externalId`, and `Switch([IsSoftDeleted], ...)` → `active`.

  ![User attribute mapping](https://705252832-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6wDJF-clP9xeoy68-u%2Fuploads%2F94aM9P0bF544JHqqXd4d%2Fscim-08-entra-mapping-users.png?alt=media)
* **Groups**: `displayName` → `displayName`, `members` → `members`, `objectId` → `externalId`. Keep `objectId` → `externalId`: it lets workspace access you already granted to an Entra group carry over. This needs the Graph permission described in *Before you start*.

  ![Group attribute mapping](https://705252832-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6wDJF-clP9xeoy68-u%2Fuploads%2FZnMl0yrrlQP0LA7uGt4K%2Fscim-09-entra-mapping-groups.png?alt=media)

## 4. Choose who is provisioned and start

1. In the application's **Users and groups**, choose **Add user/group** and assign the users and groups who should have Orkestra.

   ![A group assigned to the Orkestra application](https://705252832-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6wDJF-clP9xeoy68-u%2Fuploads%2FEfE2Oc9k6AVLCKMaMbMt%2Fscim-10-entra-users-and-groups.png?alt=media)
2. Back in **Provisioning**, open **Settings** and keep **Scope** on **Sync only assigned users and groups**. Set **Provisioning Status** to **On**, then **Save**. (You can also choose **Start provisioning** on the provisioning overview.)

   ![Scope and Provisioning Status](https://705252832-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6wDJF-clP9xeoy68-u%2Fuploads%2FP5G61tCqBj9oX0av5z0Y%2Fscim-11-entra-scope-and-status.png?alt=media)

Entra's first cycle starts within a few minutes; later cycles run about every 40 minutes.

## 5. Test and monitor

To provision one user or group right away, open **Provision on demand**, select them (for a group, up to 5 of its members), and choose **Provision**.

![Provision on demand for a group and one of its members](https://705252832-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6wDJF-clP9xeoy68-u%2Fuploads%2FVycrHXzucSn44oY7Az3T%2Fscim-12-entra-provision-on-demand.png?alt=media)

Each step should show **Success**.

![Provision on demand result](https://705252832-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6wDJF-clP9xeoy68-u%2Fuploads%2Ft8o8Wd0KB1v2KDfpcmsa%2Fscim-13-entra-on-demand-result.png?alt=media)

**Provisioning logs** list every operation and Orkestra's answer.

![Provisioning logs](https://705252832-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6wDJF-clP9xeoy68-u%2Fuploads%2Fldp9hj5GnyLR5EjZxPbQ%2Fscim-14-entra-provisioning-logs.png?alt=media)

## What happens in Orkestra

| In Entra                                                   | In Orkestra                                                                                                                                                                                                                                                                            |
| ---------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| A user is assigned                                         | An account is created (Pending). It becomes active, and takes a seat, at the person's first SSO sign-in.                                                                                                                                                                               |
| An existing Orkestra user of your organization is assigned | Their account is linked; nothing else changes.                                                                                                                                                                                                                                         |
| A user's name or email changes                             | The name is updated. The email is updated too, except for administrators and for accounts that existed in Orkestra before Entra linked them: change those in the console.                                                                                                              |
| A user is unassigned, disabled or deleted                  | They are removed from your organization (the same as removing them in the console): access, API keys and seat are released, and they can no longer sign in. A session they already have open ends within 24 hours.                                                                     |
| A removed user is assigned again                           | Their account comes back as Pending. An administrator role or workspace access they had directly is not restored; access through groups applies again.                                                                                                                                 |
| A group is assigned                                        | The group is created in Orkestra with its members. To give it access to a workspace, open the workspace's settings, choose **Add a group** under its users, then pick the group on the **Azure Groups** tab and choose a role (this needs the Graph permission in *Before you start*). |
| A group's members change                                   | Membership is updated; access the group gives follows immediately.                                                                                                                                                                                                                     |
| A group is unassigned or deleted                           | Its members lose what the group gave them.                                                                                                                                                                                                                                             |

Orkestra never moves an account that belongs to another Orkestra organization, and never removes your organization's last administrator. Those cases show as errors in Entra's provisioning logs, with an explanation.

## Troubleshooting

* **Test connection fails with 401**: the token is wrong, was regenerated, or SCIM was turned off. Create a new token and paste it again.
* **Requests fail with 403 "Single sign-on is not set up for this organization"**: SSO was switched off or its configuration is incomplete. SCIM provisioning pauses until SSO is set up again; the token then works again.
* **"This email already belongs to another Orkestra account"**: the person already has an account in another Orkestra organization (or a free account). Contact <helpdesk@orkestra.online> to move it.
* **"This user is the organization's last active Orkestra administrator…"**: make another user an administrator in the management console first.
* **"This email domain belongs to another Orkestra organization"**: the user's email domain is registered to a different Orkestra organization. Contact <helpdesk@orkestra.online>.
* **"This group belongs to another Orkestra organization"**: the same Entra group is already provisioned to another Orkestra organization. Contact <helpdesk@orkestra.online>.
* **A group already exists in Orkestra with the same name**: Orkestra does not merge an Entra group into a group created by hand in Orkestra; it creates a separate group.
* Entra's **Provisioning logs** show every operation and Orkestra's answer (see step 5).
