> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloudthinker.io/llms.txt
> Use this file to discover all available pages before exploring further.

# SCIM Provisioning

> Connect your identity provider to CloudThinker with SCIM 2.0 so people are added, suspended, and removed as your directory changes.

SCIM (System for Cross-domain Identity Management) lets your identity provider (IdP), such as Okta or Microsoft Entra ID, manage CloudThinker accounts for you. Assign someone to the CloudThinker app in your IdP and they join your organization; unassign them and their access ends, with no manual invites or removals.

## Prerequisites

* An organization on the **Scale** or **Enterprise** plan. See [Pricing](https://docs.cloudthinker.io/guide/billing/pricing.md).
* An active [SSO connection](https://docs.cloudthinker.io/guide/security/sso.md) with a verified domain. The provisioning settings only appear once SSO is active.
* The organization **Owner** role in CloudThinker. Admins can't manage SSO or SCIM. See [Roles and permissions](https://docs.cloudthinker.io/guide/security/roles.md).
* Admin access to the provisioning settings of your CloudThinker app in your IdP.

## What SCIM changes in CloudThinker

![Assigning in the IdP makes a member Active; deactivating or unassigning suspends them; reactivating restores them with auto-assigned workspaces; a SCIM DELETE removes them. Pushed groups map to workspaces and only add access.](https://mintcdn.com/cloudthinker/r0iC8p2_70AdXJfW/images/security/diagram-scim-light.svg?fit=max\&auto=format\&n=r0iC8p2_70AdXJfW\&q=85\&s=b8aeaf3df274e25c3e39af2838e8fa0b)

Unassigning suspends a member; only a SCIM DELETE removes them, and group mappings only add access.

| In your IdP | In CloudThinker |
| - | - |
| Assign a person to the CloudThinker app | They're added to your organization with the **Auto-assigned organization role** and get the **Auto-assigned workspaces** |
| Change their name or email | Their CloudThinker profile updates |
| Deactivate them (set inactive) | Their membership is suspended and they lose access to every workspace |
| Reactivate them | Their membership comes back, with the auto-assigned workspaces |
| Delete them (SCIM `DELETE`) | They're removed from the organization |
| Push a group | The group appears under **Group mappings**, where you pick workspaces for its members |

Unassigning someone from the app usually counts as a deactivation, not a delete. Okta and Microsoft Entra ID both send `active=false` when you unassign a user, so the person is **suspended** in CloudThinker, not removed. They're removed only when your IdP sends a `DELETE`.

While SCIM is on, your IdP is the source of truth for who's in the organization:

* **Member invitations are turned off.** Inviting from CloudThinker returns "Member invitations are disabled because this organization uses SCIM provisioning."
* **You can't remove a SCIM-provisioned member in CloudThinker.** The error reads "This member was provisioned via SCIM." Remove them in your IdP instead.
* **Just-in-time provisioning is turned off.** SCIM and just-in-time (accounts created on first SSO sign-in) can't run together. Turning on SCIM switches just-in-time off for you. Someone on your domain whom your IdP hasn't provisioned is refused at SSO sign-in with "No account found. Contact your administrator for access." until your IdP provisions them.

You can still change a member's role or workspace access in CloudThinker. See [Organization](https://docs.cloudthinker.io/guide/organization.md).

## Turn on SCIM in CloudThinker

**1. Open the provisioning settings**

Go to **Admin Settings → Identity and access** and find the **Provisioning & directory sync** card under your SSO connection.

If the card is missing, your SSO connection isn't active yet. Finish [SSO setup](https://docs.cloudthinker.io/guide/security/sso.md) first.

**2. Choose SCIM**

Select **SCIM** (Sync users and groups from your identity provider). The other options are **Manual** (you invite people yourself) and **Just-in-time** (accounts are created on first SSO sign-in).

**Success state:** the **SCIM enabled** dialog opens.

**3. Copy the two values**

The dialog shows:

* **Bearer token**: the secret your IdP sends to prove its requests are allowed.
* **SCIM base URL**: the endpoint your IdP calls. It looks like `https://<your-cloudthinker-host>/api/v1/scim/<organization-id>/v2`.

Copy both, then click **Done**.

**Success state:** the card shows **Directory sync (SCIM)** with "SCIM directory sync is active."

> [!WARNING]
>
> The bearer token is shown only once. If you close the dialog without copying it, click **Rotate token** to get a new one.

## Set defaults for new members

Below the provisioning options, two settings decide what a newly provisioned person gets. Set them before your IdP sends its first users.

| Setting | What it does | Default |
| - | - | - |
| **Auto-assigned organization role** | The organization role new members get: **Viewer**, **Developer** or **Admin** | **Viewer** |
| **Auto-assigned workspaces** | The workspaces new members join | Your default workspace |

Owner can't be assigned this way. For what each role can do, see [Roles and permissions](https://docs.cloudthinker.io/guide/security/roles.md).

## Configure your identity provider

Use the CloudThinker app you created for SSO.

> [tab] Okta
>
> **1. Enable SCIM on the app**
>
> Open the CloudThinker app. On the **General** tab, click **Edit** under **App Settings**, set **Provisioning** to **SCIM**, and save.
>
> **2. Enter the connection details**
>
> On **Provisioning → Integration**, click **Edit**:
>
> | Okta field | Value |
> | - | - |
> | **SCIM connector base URL** | The **SCIM base URL** from CloudThinker |
> | **Unique identifier field for users** | `userName` |
> | **Supported provisioning actions** | **Push New Users**, **Push Profile Updates**, **Push Groups** |
> | **Authentication Mode** | **HTTP Header** |
> | **Authorization** | The **Bearer token** from CloudThinker |
>
> Click **Test Connector Configuration**, then **Save**.
>
> **3. Turn on To App actions**
>
> On **Provisioning → To App**, click **Edit** and enable **Create Users**, **Update User Attributes** and **Deactivate Users**. Save.
>
> **4. Push groups**
>
> On the **Push Groups** tab, add the groups you want to map to workspaces.

> [tab] Microsoft Entra ID
>
> **1. Set the admin credentials**
>
> Open **Enterprise applications → CloudThinker → Provisioning**. Set **Provisioning Mode** to **Automatic**. Under **Admin Credentials**, enter the **SCIM base URL** as **Tenant URL** and the **Bearer token** as **Secret Token**. Click **Test Connection**, then **Save**.
>
> **2. Check the mappings**
>
> Under **Mappings**, keep user and group provisioning enabled. Confirm the attribute mapped to `userName` holds the user's email on a verified domain.
>
> **3. Start provisioning**
>
> Under **Settings**, set **Scope** to **Sync only assigned users and groups**. Set **Provisioning Status** to **On** and save. Entra runs a cycle about every 40 minutes.

> [tab] Other SCIM 2.0 provider
>
> | IdP field | Value |
> | - | - |
> | SCIM base URL / Tenant URL | The **SCIM base URL** from CloudThinker |
> | Authentication | HTTP header, bearer token |
> | Bearer token / Secret token | The **Bearer token** from CloudThinker |
> | Unique identifier for users | `userName`, set to the user's email address |
>
> Turn on create users, update user attributes, deactivate users and push groups. Run your IdP's **Test connection** if it has one.

CloudThinker reads these attributes:

| Resource | Attribute | Required | Used for |
| - | - | - | - |
| User | `userName` | Yes | Email, when `emails` is empty |
| User | `emails` | No | Email. The `primary` entry wins, otherwise the first. |
| User | `name.givenName`, `name.familyName` | No | Display name |
| User | `active` | No (default `true`) | Suspending and reactivating |
| User | `externalId` | No | Matching the user in filters |
| Group | `displayName` | Yes | The name under **Group mappings** |
| Group | `members` | No | Who gets the group's workspaces |
| Group | `externalId` | No | Matching the group |

**Success state:** assign one test user to the app. Within your IdP's sync interval they appear in **Admin Settings → Organization → Members**, and **View sync logs** shows a `CREATE` entry with status `SUCCESS`.

What CloudThinker's SCIM API supports, so you can match your IdP's options:

| Capability | Supported |
| - | - |
| Users and Groups resources (create, read, replace, patch, delete) | Yes |
| Filters with `eq` on `userName`, `emails.value`, `externalId`, `active` (users) and `displayName` (groups) | Yes, up to 100 results |
| Bulk operations | No |
| Sorting, ETags, password changes | No |

> [!NOTE]
>
> If someone already has a CloudThinker account from another organization, CloudThinker adds that existing account to yours only when its email domain is one of your verified SSO domains. Otherwise your IdP gets "User email domain not verified for this organization."

## Map groups to workspaces

Groups let one IdP change put a whole team into the right workspaces.

**1. Push groups from your IdP**

In your IdP, assign the groups to the CloudThinker app and push them.

**Success state:** each group shows up under **Group mappings** on **Admin Settings → Identity and access**, with its **Group name** and **Members** count. Until then the section reads "No groups synced yet."

**2. Pick workspaces for each group**

In the group's row, open **Auto-assigned workspaces** and select the workspaces its members should join.

**3. Choose the group role**

Set **Auto-assigned organization role** for the group, or leave **Inherit from connection** to use the default role you set above.

CloudThinker sets a member's organization role once, when it creates them. Later syncs don't change it, so a role you change by hand in CloudThinker stays.

**4. Save the row**

Click **Save** in the **Actions** column.

**Success state:** current members of the group are added to the selected workspaces, and future members are added when your IdP syncs them into the group.

> [!WARNING]
>
> Group mappings only add workspace access. Removing someone from a group, or removing a workspace from a mapping, doesn't take them out of that workspace. Remove them in [workspace members](https://docs.cloudthinker.io/guide/workspace-users.md), or unassign them from the app in your IdP to remove them everywhere.

After the first sync, check new members' roles in **Admin Settings → Organization → Members** and adjust any that should differ.

## What happens when someone leaves

| IdP action | Membership in CloudThinker | Workspaces | Their automations |
| - | - | - | - |
| Deactivate (set inactive) | Suspended | Removed from all | Turned off |
| Reactivate | Active again, if a seat is free | Auto-assigned workspaces only; re-add the rest | Stay off until someone turns them on |
| Delete (SCIM `DELETE`) | Removed | Removed from all | Turned off |

[Automations](https://docs.cloudthinker.io/guide/automation/automations.md) never change owner on their own. A workspace Admin can select **Take ownership** on the automation's page, and it stays off until they turn it on. See [automation owners](https://docs.cloudthinker.io/guide/automation/autonomous-agents.md).

> [!NOTE]
>
> If your plan uses per-seat billing and every seat is taken, a newly provisioned or reactivated person is added as inactive and can't use CloudThinker yet. Active members and pending invitations use seats; suspended and inactive members don't. The Owner adds seats on **Admin Settings → Billing**; see [Add or remove seats](https://docs.cloudthinker.io/guide/billing/subscription.md#add-or-remove-seats). Then check their status in **Admin Settings → Organization → Members**.

## Rotate or turn off the token

**Rotate the token** when it may have leaked or your policy requires it:

**1. Rotate**

In **Directory sync (SCIM)**, click **Rotate token**, then **Rotate** in the confirmation.

**Success state:** a dialog shows the new **Bearer token** and the **SCIM base URL**. The old token keeps working for 24 hours.

**2. Update your IdP**

Paste the new token into your IdP's provisioning settings and test the connection. Do it within 24 hours, or syncs start failing with authentication errors.

**Turn off SCIM** by choosing **Manual** or **Just-in-time** in **Provisioning & directory sync**, then **Disable SCIM** in the confirmation. This revokes the token at once and stops directory sync. Existing members keep their accounts, and you manage them in CloudThinker from then on. Turn off provisioning in your IdP too, or it keeps sending requests that fail.

Token changes (generate, rotate, revoke) and every user or group that SCIM provisions, updates or removes are recorded in [audit logs](https://docs.cloudthinker.io/guide/security/audit-logs.md).

## Check sync activity

Click **View sync logs** in **Directory sync (SCIM)** to open **SCIM sync logs**.

| Column | Shows |
| - | - |
| **Timestamp** | When CloudThinker processed the request |
| **Action** | `CREATE`, `UPDATE`, `DEACTIVATE` or `DELETE` |
| **Resource** | `User` or `Group`, with its ID |
| **Status** | `SUCCESS`, `SKIPPED` or `FAILED` |

CloudThinker also checks once a day for SCIM-provisioned people with no sync activity for 7 days, and adds an `UPDATE` entry with status `SKIPPED` for each one. It's a reminder only: CloudThinker doesn't change their access. Check that the person is still assigned in your IdP, and unassign them there if they've left.

## Troubleshooting

> [accordion] The Provisioning & directory sync card isn't there
>
> The card only shows when your SSO connection is active. Finish [SSO setup](https://docs.cloudthinker.io/guide/security/sso.md), including domain verification. You also need the Owner role.

> [accordion] Groups don't appear under Group mappings
>
> CloudThinker doesn't pull groups; your IdP has to push them. Assign the groups to the CloudThinker app in your IdP, run a push, then look for `Group` entries in **View sync logs**.

> [accordion] A user wasn't provisioned
>
> Confirm the user is assigned to the CloudThinker app in your IdP, then look for a `FAILED` entry in the sync logs. Common causes: the token was rotated more than 24 hours ago or revoked, the person's existing account uses an unverified email domain ("User email domain not verified for this organization"), or the email is reserved for an internal CloudThinker account ("This email belongs to a CloudThinker System user"). For the last one, use a different email or contact support.

> [accordion] Someone left but can still sign in
>
> Unassign or deactivate them on the CloudThinker app itself. Removing them from a group only changes group membership. Some IdPs sync on a schedule (Microsoft Entra ID runs about every 40 minutes), so wait for the next cycle and check the sync logs.

> [accordion] All syncs fail with authentication errors
>
> The token in your IdP is no longer valid: the token was rotated more than 24 hours ago, or SCIM was turned off. Click **Rotate token** and paste the new value into your IdP. If SCIM was turned off, select **SCIM** again to get a new token.

> [accordion] Cannot enable JIT provisioning while SCIM is active
>
> Just-in-time and SCIM can't run together. Choose **Just-in-time** in **Provisioning & directory sync** and confirm **Disable SCIM**, which revokes the token and stops directory sync.

> [accordion] I can't invite or remove a member
>
> That's expected while SCIM is on. Assign or unassign people in your IdP instead.

## Next steps

> [card] [Roles and permissions](https://docs.cloudthinker.io/guide/security/roles.md)
>
> Pick the right default role for provisioned members.

> [card] [Workspace members](https://docs.cloudthinker.io/guide/workspace-users.md)
>
> Fine-tune who can open each workspace.

> [card] [Audit logs](https://docs.cloudthinker.io/guide/security/audit-logs.md)
>
> Review token changes and deprovisioning.

> [card] [Single sign-on](https://docs.cloudthinker.io/guide/security/sso.md)
>
> Change your SSO connection or verified domains.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.