> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/sonarqube-server/10.7/instance-administration/authentication/saml/scim/scim-provisioning-with-azure-ad.md).

# With Microsoft Entra ID

Enable SCIM to automate user and group provisioning from Azure AD to SonarQube Server 10.7

{% hint style="info" %}
**For AI agents:** You're in the SonarQube Server 10.7 documentation. For a list of all 10.7 pages, see the [SonarQube Server 10.7 page index](https://3272878703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FI10pmJWeVVXYITlQJllp%2Fuploads%2FnEeIaIlHm7ezec5g9iHc%2Fsonarqube-server-10.7-llms.txt?alt=media). For the whole site, see the [page index](https://docs.sonarsource.com/llms.txt) or the [full text](https://docs.sonarsource.com/llms-full.txt). For another version, replace 10.7 in the URL with that version. The [latest version](https://docs.sonarsource.com/sonarqube-server/) has no version number in its URL.
{% endhint %}

*Automatic provisioning through SCIM is available starting in* [*Enterprise Edition*](https://www.sonarsource.com/plans-and-pricing/enterprise/)\*. \*

You can enable SCIM to automate user and group provisioning from Microsoft Entra ID (previously known as Azure AD) to SonarQube Server. For an overall understanding of the feature, read the SCIM [Overview](/sonarqube-server/10.7/instance-administration/authentication/saml/scim/overview.md) page.

## Prerequisites <a href="#prerequisites" id="prerequisites"></a>

You have a working [Introduction](/sonarqube-server/10.7/instance-administration/authentication/saml/ms-entra-id/introduction.md).

## Configuring SonarQube Server <a href="#configuring-sonarqube" id="configuring-sonarqube"></a>

1\. Within SonarQube Server, go to **Administration** > **Authentication** > **SAML**.

2\. Under **Provisioning**, click **Automatic user and group provisioning with SCIM**.

3\. Click **Save** and validate the pop-up window if you are sure you want to enable SCIM.

SCIM is now enabled in SonarQube Server, it will handle all the queries coming from Microsoft Entra ID about users and groups.

## Configuring Microsoft Entra ID <a href="#configuring-azure-a-d" id="configuring-azure-a-d"></a>

**Step 1:** In Microsoft Entra ID, go to **Identity** > **Applications** > **Enterprise applications** > **All applications** and select the SonarQube Server application. On the application’s page, select **Provisioning**.

![](https://3272878703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FI10pmJWeVVXYITlQJllp%2Fuploads%2Fgit-blob-cffe8e4ce3b709a5a553c0e8e55ed9a8ab19804f%2F865f8aa4d8e419c405168214b487945252218717.png?alt=media)

**Step 2:** On the **Provisioning** page, click **Get started**.

**Step 3:** Under **Provisioning Mode**, select **Automatic**.

**Step 4:** Configure the **Admin Credentials** section as follows:

* * **Tenant Url**: `<sqServerBaseUrl>/api/scim/v2`
  * **Secret token**: Paste a [Managing your tokens](/sonarqube-server/10.7/user-guide/managing-tokens.md) for an admin account in this field. For safety reasons, we recommend using a token from a local admin account (not managed through SCIM).

![](https://3272878703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FI10pmJWeVVXYITlQJllp%2Fuploads%2Fgit-blob-2beccc930bd6bba2260df77942d1b171975c088a%2F5ffa01e41e509c222ab73436e823e2147ed19a08.png?alt=media)

Click **Test Connection** to check that your credentials are valid, then click **Save.**

**Step 5.a:** Under **Mappings**, click on **Provision Microsoft Entra ID Groups**. This opens the **Attribute Mapping** dialog for groups.

**Step 5.b:** Under **Target Object Actions**, make sure that **Create**, **Update**, and **Delete** are enabled.

![](https://3272878703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FI10pmJWeVVXYITlQJllp%2Fuploads%2Fgit-blob-7a223f97ee7720a9d106e27c0a44035de244df35%2F2bb7ad5fe1bfe5f2914495b5c101f5c95ccca86c.png?alt=media)

**Step 5.c:** In **Attribute Mappings**, make sure `displayName` appears in both columns of the mapping. This ensures groups are mapped based on their names.

![](https://3272878703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FI10pmJWeVVXYITlQJllp%2Fuploads%2Fgit-blob-854a9a27a33f45e8993ccaecd03b164e07fe5cb0%2F36e1fbee4765b2a714e74e4c24713be4f854ce81.png?alt=media)

**Step 5.d**: Click **Save.** This takes you back to the **Provisioning** page. If this was the default configuration, go back to the previous page.

**Step 6.a**: Under **Mappings**, click on **Provision Microsoft Entra ID Users**. This opens the **Attribute Mapping** dialog for users.

**Step 6.b:** Under **Target Object Actions**, make sure that **Create**, **Update,** and **Delete** are enabled.

**Step 6.c:** In **Attribute Mappings** , map the `userName` **customappsso Attribute** (target) to the **Microsoft Entra ID Attribute** (source) used as SAML user login attribute in your SAML configuration.\
For example, if your login attribute is `http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress` in your SonarQube Server’s SAML configuration and it is mapped to `user.userprincipalname` (default), use `userprincipalname` here. Otherwise, if it is mapped to `user.mail`, then use `mail` instead.

![](https://3272878703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FI10pmJWeVVXYITlQJllp%2Fuploads%2Fgit-blob-43001deaa9ba3e2c9e2b73bca12e37f6c3b5317c%2F1b4cfad1f0a4a053135ad7c192d021afeaa5bf28.png?alt=media)

{% hint style="info" %}
To check which Microsoft Entra ID attribute is used as SAML user login attribute:

1. In SonarQube Server, go to **Administration** > **Authentication** > **SAML**.
2. In **SAML Configuration > SAML**, select **Edit**. The MS Entra ID attribute is the value of **SAML user login attribute**.
   {% endhint %}

**Step 6.d:** Click **Save.** This takes you back to the **Provisioning** page.

**Step 7:** In the **Settings > Scope** section, select **Sync only assigned users and groups**.

![](https://3272878703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FI10pmJWeVVXYITlQJllp%2Fuploads%2Fgit-blob-1064a34a51e74c1ac96c7569331fe2f553fae88c%2Fe31347571c9f77670da43c220ea9982fe6e2c95a.png?alt=media)

**Step 8:** Set the provisioning status to **On** and click **Save**. The Microsoft Entra ID users and groups will be synchronized with SonarQube Server.

{% hint style="info" %}
Microsoft Entra ID runs a SCIM synchronization every 40 minutes. Changes in Microsoft Entra ID are not reflected immediately in SonarQube Server.
{% endhint %}


---

# 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.sonarsource.com/sonarqube-server/10.7/instance-administration/authentication/saml/scim/scim-provisioning-with-azure-ad.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.
