# Set up SCIM provisioning

> Let Okta, Microsoft Entra ID or another identity provider add, change and remove your members automatically with SCIM 2.0.

Source: https://docs.bifrostorbit.com/orbit/admins/set-up-scim/

## Before you start

SCIM 2.0 lets your identity provider manage your members in Orbit. When you assign someone to the Orbit app in your provider, they join your organisation; when you change their groups, their access changes; when you unassign or deactivate them, they lose access at once, in every satellite.

SCIM works together with single sign-on. You need a sign-in connection with your email domains first, such as [Microsoft SSO](https://docs.bifrostorbit.com/orbit/admins/connect-microsoft-sso/), [Google SSO](https://docs.bifrostorbit.com/orbit/admins/connect-google-sso/), [an OpenID Connect provider](https://docs.bifrostorbit.com/orbit/admins/connect-oidc-sso/) or [a SAML provider](https://docs.bifrostorbit.com/orbit/admins/connect-saml-sso/). Your provider can only add people on those domains.

## What SCIM changes and what it leaves alone

- People your provider adds join with the access their groups give. They are marked **From SCIM** under **Members**.
- **Owners are never changed**, and SCIM cannot make anyone an owner.
- **People you added by hand keep what you gave them.** SCIM never changes or removes a member it did not add. The same goes for people who joined through single sign-on before SCIM added them.
- If you edit a SCIM member's access under **Members**, your change wins and SCIM stops changing that person.
- Deactivating or deleting someone in your provider removes their membership straight away.
- Seat limits on your plans apply: if a satellite is full, the person joins without it.

## 1. Create a token in Orbit

1. In Orbit, open **Organisations**, choose your organisation, then the **Sign-in** tab.
2. In **Provisioning (SCIM)**, copy the **Base URL**. It is the same for every organisation, such as `https://app.bifrostorbit.com/scim/v2`: the token says which organisation it is for.
3. Choose **Generate token** and copy the token. It starts with `scim_` and is shown only once; Orbit keeps only a fingerprint of it.

Each organisation has one token at a time. **Replace token** creates a new one and stops the old one at once. **Revoke token** stops provisioning; members it added keep their access until you change it.

## 2. Connect your provider

**Okta:**

1. Open the Orbit app you created for single sign-on, and on **General** choose **Edit** under **App Settings**. Turn on **Provisioning: SCIM** and save. (Apps from the OIDC wizard may need you to choose **Enable SCIM provisioning**.)
2. On the new **Provisioning** tab, choose **Edit** under **SCIM Connection**:
   - **SCIM connector base URL**: the base URL from Orbit.
   - **Unique identifier field for users**: `userName`.
   - **Supported provisioning actions**: *Push New Users*, *Push Profile Updates* and *Push Groups*.
   - **Authentication Mode**: *HTTP Header*, with the token from Orbit as the **Bearer** token.
3. Choose **Test Connector Configuration**, then **Save**.
4. Under **Provisioning** > **To App**, choose **Edit** and turn on *Create Users*, *Update User Attributes* and *Deactivate Users*.
5. On **Push Groups**, push the groups you want to give access by.

**Microsoft Entra ID:**

1. In the Microsoft Entra admin center, open **Enterprise applications**. Use your SAML app, or for Microsoft SSO create a separate enterprise app with **Create your own application** > *Integrate any other application you don't find in the gallery* just for provisioning.
2. Open **Provisioning** and set **Provisioning Mode** to *Automatic*.
3. Under **Admin Credentials**, paste the base URL into **Tenant URL** and the token into **Secret Token**. Choose **Test Connection**, then **Save**.
4. Under **Mappings**, keep **Provision Microsoft Entra ID Users** and **Provision Microsoft Entra ID Groups** on. Check that `userName` is mapped from `userPrincipalName` or `mail`, whichever holds the address on your domain.
5. Assign the people and groups to provision under **Users and groups**, then set **Provisioning Status** to *On*.

Microsoft Entra ID provisions every 40 minutes or so. **Provision on demand** sends one person straight away, which helps when you test.

**OneLogin, JumpCloud and others:** look for *SCIM 2.0* or *SCIM provisioning* on the app. Use the base URL, *Bearer token* authentication and the token from Orbit, and `userName` (the email address) as the user's identifier.

## 3. Give access by group

Groups your provider pushes appear in **Provisioning (SCIM)** under **Group access**, with how many members each has. They give no access until you say so:

1. Choose **Give access** next to a group.
2. Choose the role, *Admin* or *Member*, and the satellites its members get.
3. Under **Everyone else**, choose what active people in no group with access get: *No access*, or a role and satellites.
4. Choose **Save provisioning**.

Someone in several groups with access gets the highest role and every satellite those groups give. Changes apply to everyone at once when you save, and to each person whenever your provider sends a change.

## Checking it works

- **Members** shows people your provider added, marked **From SCIM**.
- The **Audit trail** records every change SCIM makes, by **SCIM provisioning**: people provisioned, deactivated and deleted, groups changed, and the access each person got or lost.
- **Token** in **Provisioning (SCIM)** shows when your provider last used it.

## If something goes wrong

**Your provider says the domain is not one of this organisation's sign-in domains:** add the domain to one of your sign-in connections, then retry in your provider.

**Your provider gets 401 Unauthorized:** the token was replaced or revoked, or was copied with a space. Generate a new one and paste it again.

**Your provider gets 429 Too Many Requests:** it sent more than 1,200 requests a minute. It retries on its own.

**Someone has no access:** check they are active in your provider, in a group with access or covered by **Everyone else**, and not a member you added by hand.
