> For the complete documentation index, see [llms.txt](https://docs.datasaur.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datasaur.ai/integrations/scim/microsoft-entra-id.md).

# Microsoft Entra ID

This guide assumes that you have already enabled SCIM in the Datasaur app and want to use Microsoft Entra ID as the identity provider for both SAML and SCIM integration.

## Integrate SCIM 2.0 with Microsoft Entra ID

1. Open the **Enterprise Application** created during the SAML setup.
2. Go to the **Provisioning** tab.
3. Set **Provisioning Mode** to **Automatic**.

### Configure SCIM 2.0

1. In the **Admin Credentials** section, do the following:
   1. Enter the following **Tenant URL**:

      ```
      https://<datasaur-app-base-url>/api/teams/<your-team-id>/scim/v2.
      ```

      Replace `<datasaur-app-base-url>` and **`<your-team-id>`** accordingly.

      1. For SaaS Datasaur-hosted, you can use `app.datasaur.ai` as the `<datasaur-app-base>`. If you're self-hosted, adjust accordingly based on your domain.
      2. You can find the team ID in the URL. For example, if you are currently on `https://app.datasaur.ai/teams/1/projects`, your team ID is `1`.
   2. Fill the **Secret Token** with the API key that you [generated before](/integrations/scim.md) from the Datasaur app.
2. Click **Test Connection**.
3. Click **Save** and turn on the **Provisioning Status**.

## Provision users to Datasaur

After provisioning is enabled, Microsoft Entra ID automatically syncs assigned users approximately every 40 minutes.

If you do not want to wait for the next sync cycle, you can manually trigger provisioning for specific users through **Provision on demand**.

### Provision users on demand

1. Open the **Provisioning** tab.
2. Go to **Provision on demand**.
3. Select the users you want to provision.

After the next provisioning cycle or an on-demand sync, the users will be added to the orkspace with the default **Labeler** role.

{% hint style="warning" %}
**Prerequisites:** Group provisioning requires that the SCIM implementation supports PATCH requests. Microsoft Entra ID will use PATCH operations to manage group membership changes.
{% endhint %}

1. Go to the **Users and groups** tab.
2. Click **Add user/group**.
3. Switch the selection to **Groups** and select the group you want to assign.
4. Click **assign**.
