> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/guides-and-quickstarts/organization-administration/scim-provisioning.md).

# SCIM provisioning

SCIM provisioning synchronizes users and groups from your identity provider to StackAI. Configure the connection and role mappings, then verify the records created by the provider.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2F2h43xjyVnWJYp4dOOarA%2FG094.mp4?alt=media&token=81f0831e-dffe-47f1-ae3a-9076f7d2d1b3>" %}

## Before you start

Ask your identity administrator to own directory assignments and synchronization. The team manager should agree the default role, activation behavior, and user/group scope. Start with a small approved pilot and inspect actual records before assigning the wider organization. Complete [SSO setup](https://docs.stackai.com/guides-and-quickstarts/organization-administration/sso-setup.md) first.

Before enabling provisioning:

* Configure [SSO](https://docs.stackai.com/guides-and-quickstarts/organization-administration/sso-setup.md) for the StackAI organization. SCIM cannot be enabled without an SSO configuration.
* Obtain permission to manage provisioning in StackAI and in your identity provider.
* Select the identity provider and a default organization role in SCIM settings. Both are required to enable SCIM.
* Decide whether new users should activate automatically and whether groups should synchronize.

For provider-specific steps, use [Okta](https://docs.stackai.com/guides-and-quickstarts/organization-administration/scim-provisioning/scim-provisioning-with-okta.md) or [Microsoft Entra ID](https://docs.stackai.com/guides-and-quickstarts/organization-administration/scim-provisioning/scim-provisioning-with-microsoft-entra-id.md).

## Review provisioning settings

Open SCIM Provisioning and review its prerequisites and defaults.

![SCIM prerequisites and defaults](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/iJ2yqmRCRQnJ0QhYiBF3/assets/g094-g094-01-defaults.png)

Check the identity provider, default role, automatic activation, and group synchronization options.

## Create a token and enable SCIM

Create a dedicated provisioning token with a descriptive name and suitable expiration.

![Dedicated provisioning token creation](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/4Dhs9Oyj3TOlSPwDtNbn/assets/g094-g094-02-token.png)

Store the issued credential securely for the identity-provider configuration.

Read the Enable SCIM confirmation before enabling provisioning.

![Enable SCIM confirmation](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/RFDqBx2d3gKLptvdLcj5/assets/g094-g094-03-enable.png)

SCIM can create members and manage their roles and active status from the identity provider. Existing members can become directory-managed when the provider provisions them. Review the provider assignments before starting synchronization.

Confirm SCIM Enabled and inspect the provisioning endpoint and token entry.

![Enabled SCIM endpoint and token entry](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/oNWiHBpHI92pJo0hhV8z/assets/g094-g094-04-status.png)

Use the endpoint generated for this deployment in the identity provider.

## Map roles

Select Add Mapping and pair the incoming IdP Role Value with the required Organization Role.

![IdP role to organization role mapping](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/AYwmZBvXKaIG7OWsPqzl/assets/g094-g094-05-mapping.png)

Check the saved mapping before provisioning users. When an incoming role has no matching mapping, StackAI uses the default SCIM role. Role-value matching ignores case and surrounding whitespace.

## Verify provisioned users and groups

Open Members and inspect directory-managed accounts and roles.

![Directory-managed member roles](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/cJTVrFmfIN9vhWKJEdgJ/assets/g094-g094-06-members.png)

Compare their assignments with the role mappings and default role.

Open Groups and check the synchronized groups and membership.

![Synchronized groups and membership](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/xwDtYBw5WjkLDYJm8OjO/assets/g094-g094-07-groups.png)

Successful provider connectivity alone does not confirm that the intended records were provisioned.

## Important behavior

A successful connection does not confirm that all intended users and groups have been provisioned. Inspect the resulting records and roles.

Keep the provisioning token private and store it securely. Its full value is shown when it is created.

* **Activation:** automatic activation controls new users. An inactive status sent by the provider creates an inactive membership; later provisioning updates can change active status.
* **Deactivation:** deleting a provisioned user through SCIM deactivates the membership rather than deleting the person's account.
* **Groups:** group provisioning requires group synchronization to be enabled as well as SCIM.
* **Disabling SCIM:** provisioning tokens are revoked and SCIM-managed memberships return to local management. The disable option can also lock those memberships by making them inactive. Review the selected option before confirming.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/guides-and-quickstarts/organization-administration/scim-provisioning.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
