> 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/ms-entra-id/setup-in-sq.md).

# Setup in SonarQube Server

This page explains how to setup in SonarQube Server 10.7 SAML with Microsoft Entra ID. This is the second step of SAML authentication setup with Microsoft Entra ID.

{% 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 %}

This page explains how to set up SAML in SonarQube Server when using Microsoft Entra ID as the identity provider. This is the second step of SAML authentication setup with Microsoft Entra ID. For an overview of the complete setup, see [Introduction](/sonarqube-server/10.7/instance-administration/authentication/saml/ms-entra-id/introduction.md).

Proceed as follows:

1. Open MS Entra ID to prepare the copy-paste of single-sign-on settings in SonarQube Server.
2. Configure SAML in SonarQube Server.

## Open MS Entra ID <a href="#open-entra-id" id="open-entra-id"></a>

To prepare the copy-paste of single-sign-on settings in SonarQube Server:

1. In Microsoft Entra ID, go to **Identity** > **Applications** > **Enterprise applications** > **All applications and** select the SonarQube Server application.
2. On the application’s page, select **Single sign-on**. You will need to retrieve values related to sections **1**, **2**, and **4**. In section **2**, select **Edit** first to open the **Attributes & Claims** page.

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

## Configure SonarQube Server <a href="#configure-sq" id="configure-sq"></a>

1\. Go to **Administration > Configuration > General Settings > Authentication> SAML**.

2\. Select **Create Configuration**.

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

3\. Fill in the fields as explained in the table below.

| **Field in SonarQube**        | Description                                                                                                                                                                                                                                                                                              |
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Application ID                | Value in MS Entra ID:In the **Basic SAML Configuration** section (**1**), value of the **Identifier(Entity ID)** field.                                                                                                                                                                                  |
| Provider ID                   | Value in MS Entra ID:In the **Set up \<sonarQubeApplication>** section (**4**), value of the **Microsoft Entra ID Identifier** field.                                                                                                                                                                    |
| Provider Name                 | Name of the Identity Provider displayed in SonarQube Server login page when SAML authentication is active.                                                                                                                                                                                               |
| SAML Login URL                | Value in MS Entra ID:In the **Set up \<sonarQubeApplication>** section (**4**), value of the **Login URL** field.                                                                                                                                                                                        |
| Identity provider certificate | Certificate downloaded in **Step 2** of [Setup in Microsoft Entra ID](/sonarqube-server/10.7/instance-administration/authentication/saml/ms-entra-id/setup-in-entra-id.md).                                                                                                                              |
| SAML user login attribute     | <p>Value in MS Entra ID:In the <strong>Attributes & Claims</strong> section (<strong>2</strong>), select <strong>Edit</strong> and retrieve the <strong>Claim name</strong> (URL type value) of the attribute to be used for Login.</p><p>For an example, see the SonarQube Server screenshot below.</p> |
| SAML user name attribute      | <p>Value in MS Entra ID:In the <strong>Attributes & Claims</strong> section (<strong>2</strong>), select <strong>Edit</strong> and retrievethe <strong>Claim name</strong> (URL type value) of the attribute to be used for Name.</p><p>For an example, see the SonarQube Server screenshot below.</p>   |
| SAML user email attribute     | <p>Optional.<br>Value in MS Entra ID:In the <strong>Attributes & Claims</strong> section (<strong>2</strong>), select <strong>Edit</strong> and retrieve the <strong>Claim name</strong> (URL type value) of the attribute to be used for email.</p>                                                     |
| SAML group attribute          | <p>Optional (if you want to use the group synchronization).<br>Value in MS Entra ID:In the <strong>Attributes & Claims</strong> section (<strong>2</strong>), select <strong>Edit</strong> and retrieve the <strong>Claim name</strong> (URL type value) of the <code>groups</code> attribute.</p>       |

Below is a SonarQube Server screenshot with SAML user login and name value examples.

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

4\. Save the configuration.

5\. Before enabling SAML authentication on SonarQube Server, you can verify that the configuration is correct by selecting **Test Configuration**. This will initiate a SAML login and return useful information about the SAML response obtained from the identity provider.

6\. Select **Enable configuration**.

7\. Check that the SonarQube Server login form now contains a SAML login button.

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

## Related pages <a href="#related-pages" id="related-pages"></a>

* [Overview](/sonarqube-server/10.7/instance-administration/authentication/saml/overview.md)
* [Setup in Microsoft Entra ID](/sonarqube-server/10.7/instance-administration/authentication/saml/ms-entra-id/setup-in-entra-id.md)
* [Setup of security features](/sonarqube-server/10.7/instance-administration/authentication/saml/ms-entra-id/optional-security-features.md)
* [With Microsoft Entra ID](/sonarqube-server/10.7/instance-administration/authentication/saml/scim/scim-provisioning-with-azure-ad.md)


---

# 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/ms-entra-id/setup-in-sq.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.
