> 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/scim-provisioning-with-microsoft-entra-id.md).

# SCIM provisioning with Microsoft Entra ID

Use Microsoft Entra provisioning to synchronize assigned users and groups with StackAI. Configure the endpoint, attribute mappings, and assignment scope before provisioning records.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2F9NbYSou07wJXDiezDLB7%2FG094B.mp4?alt=media&token=2b820520-a249-4a2e-b4e4-e132349876a2>" %}

## Before you start

Complete [SCIM provisioning](https://docs.stackai.com/guides-and-quickstarts/organization-administration/scim-provisioning.md) first: SSO must exist and the provider, default role, and provisioning options must be set. Give the generated endpoint and dedicated token to your Entra administrator through an approved credential-sharing method. Agree on a pilot assignment before starting the full scope.

You need administrative access to Microsoft Entra and StackAI provisioning settings.

## Prepare StackAI provisioning

Create a dedicated SCIM token in StackAI and choose its lifetime.

![StackAI SCIM token lifetime](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/xAuKYOLsjBTEfk6fu5Ax/assets/g094b-g094b-01-token.png)

Store the token securely and copy the generated provisioning endpoint.

Map the incoming identity-provider role value to the required organization role.

![Incoming role mapping in StackAI](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/9jdmzmBPfuYDdeHFXPpy/assets/g094b-g094b-02-mapping.png)

Configure the mapping before assigning users who need it.

## Configure the Entra application

Create the StackAI enterprise application in Microsoft Entra.

![Microsoft Entra enterprise application](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/GLRCxwtsXQeo9FPrz423/assets/g094b-g094b-03-app.png)

Use an application identity that clearly identifies its provisioning purpose.

Enter the generated endpoint and token in the provisioning configuration.

![Entra provisioning endpoint and token](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/NMr6ul96CZhpDfcFU86F/assets/g094b-g094b-04-connection.png)

Check connectivity and save the intended settings.

Review source and target attribute mappings, including the user identifier and role.

![Entra source and target attribute mappings](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/yAC4ZGEmb5I8CwyDGKRt/assets/g094b-g094b-05-attributes.png)

Confirm the expressions or values that will be sent for assigned identities.

Use Users and groups to assign the intended people or groups to the application.

![Entra application user and group assignments](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/EfTMEBKvN5j0bZwfKKl4/assets/g094b-g094b-06-assignment.png)

Review the scope before starting provisioning.

## Provision an assigned object

Open Provision on demand and choose the object you want to provision.

![Provision on demand object selection](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/2upFlQsaNh90imMhxWAJ/assets/g094b-g094b-07-ondemand.png)

Inspect the operation's steps and result.

Read the import, scope evaluation, matching, and action outcomes.

![Provisioning import, scope, matching, and action results](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/cpckQoOi9xKYLNxl2PEa/assets/g094b-g094b-08-result.png)

A successful connection does not replace these object-level checks.

## Verify synchronization in StackAI

Return to StackAI and inspect the resulting members and groups.

![Resulting StackAI members and groups](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/lQCFmsoJbNjWAc4VvcOx/assets/g094b-g094b-09-target.png)

Compare their roles and membership with the Entra assignments.

After an intended membership change, check provisioning again and inspect the target state.

![Synchronization after a membership change](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/HZstQUaxJc8ppQbMS2Uz/assets/g094b-g094b-10-change.png)

Confirm synchronization from the actual records rather than connectivity alone.

## Important behavior

Provisioning on demand reports the result for a selected object. Check its scope, matching, and action results when an expected record is missing.

Connectivity alone does not confirm that users have the intended roles or group memberships.


---

# 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/scim-provisioning-with-microsoft-entra-id.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.
