Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Set up SSO

How to set up Single Sign-On (SSO) in your enterprise by using the SonarQube Cloud setup assistant.

This feature requires the SonarQube Cloud's Enterprise plan.

To set up SSO with Okta Express Configuration, see Using Okta Express Configuration.

To set up SSO in your enterprise, you must be the administrator of the enterprise in SonarQube Cloud.

Start the SSO setup assistant

  1. In SonarQube Cloud, retrieve your enterprise. See Retrieving and viewing your enterprise for more details.

  2. Go to Administration > SSO & provisioning. The SSO & provisioning page opens.

The SSO & provisioning page in SonarQube Cloud, with the Single sign-on section expanded and the Set up SSO button visible.
  1. Expand the Single sign-on section and select Set up SSO to open the Configure Single Sign-On setup assistant in a new tab.

  2. On the Set up SonarSource screen, select Get Started.

The Select Your Identity Provider step of the SSO setup assistant, listing Okta, Entra ID, Custom SAML, and Custom OIDC, with Back and Next buttons.
  1. On the Select Your Identity Provider step, select Okta or Entra ID. If your provider is not listed, select Custom SAML or Custom OIDC under Provider Not Listed?. Then select Next.

Follow the instructions below for your selection:

If using Okta OIDC

SonarQube Cloud's SSO setup assistant for Okta OIDC.

Setting up SSO with Okta moves between two interfaces: the SonarQube Cloud SSO setup assistant (see Start the SSO setup assistant) and the Okta Admin Console. Okta occasionally changes its own UI, so treat the setup assistant as the source of truth for field names and step order, and expect the Okta labels below to differ slightly from what you see.

Step 1: Create application

The setup assistant walks you through creating the application and does not call out that your access-control choice here determines whether you will need Step 4: Assign Access.

Follow the instructions in the SSO setup assistant to create the application in Okta.

  • Assignments Under Controlled access, choose one of the following options:

    • Allow everyone in your organization to access: grants access to all users in your Okta organization. If you also enable immediate access with Federation Broker Mode, Okta automatically assigns all groups to the application, so you can skip Step 4: Assign Access.

    • Limit access to selected groups: select the specific groups that should have access. If you choose this option, you can skip Step 4: Assign Access.

    • Skip group assignment for now: defer the access decision. If you choose this option, you must complete Step 4: Assign Access.

Then select Next to go to the step 2. Configure Connection.

Step 2: Configure connection

The setup assistant asks for values it does not show you how to find. This step points you to where each one lives in Okta.

  1. Go back to Okta and select your account / name profile in the top-right corner.

  2. Copy your Okta organization URL / domain.

Select your account / name in the top-right corner and copy your Okta org URL.
  1. Paste the copied value to the Okta Domain field in the setup assistant.

Step 2 of the Okta OIDC setup assistant.
  1. In Okta’s SonarQube Cloud application, go to General > Client Credentials.

  2. Copy the value of the Client ID field.

Use the copy tool to copy the Client ID.
  1. Paste the copied value to the Client ID field in the setup assistant page.

  2. Go back to your Okta’s SonarQube Cloud application and copy the client secret.

Select the copy tool in front of the secret value.
  1. Paste the copied value to the Client Secret field in the setup assistant page.

  2. In the bottom right corner of the assistant, select Create Connection and then Proceed. SonarQube Cloud is trying to connect to your Identity Provider. If the connection is established, the assistant moves to step 3. Claims Mapping.

Step 3: Claims Mapping

This step takes place entirely in the Okta Admin Console.

Note: This step is mandatory. The groups that match the filter below are sent as claims to SonarQube Cloud whenever a user logs in, independent of which groups you assigned access to the application in Step 4.

  1. In the Okta Admin Console, go to Applications and Resources > Applications, select your SonarQube Cloud application, and go to Sign On.

  2. Go down to the Token claims section, open the Show legacy configuration panel, and go to Group Claims.

  3. Select Edit.

  4. Set the fields as follows:

    • Groups claim type: Filter

    • Groups claim filter:

      • First field: groups

      • Second field: Select Matches regex and set the value to .* to match all groups in your organization, or use a more restrictive expression depending on your organization's needs.

Edit the Group Claims.

Important: The filter type must be set to Matches regex. The default Starts with filter type does not work with .* (which matches all groups) and will cause group sync to silently fail.

If users belong to groups from more than one source, such as both Active Directory and Okta, set Groups claim type to Expression instead of Filter, and use a groups claim expression for groups like this one:

For other combinations of group sources, see the Okta article Can we retrieve both Active Directory and Okta groups in OpenID Connect claims?. The article and the expression apply to Okta Classic Engine. If your organization uses Okta Identity Engine, check that the groups claim contains the expected groups before you save.

  1. Select Save.

  2. In the SonarQube Cloud's setup assistant, select Next to go to the step 4. Assign Access.

Step 4: Assign Access

Whether you need to complete this step depends on your choice in Step 1: Create application.

Note: If you already granted access while creating your application in Step 1: Create application by selecting Allow everyone in your organization to access with Federation Broker Mode enabled, Okta automatically assigned all groups to the application, so you can skip sub-steps 1-4 below and go directly to sub-step 5 to continue in the SonarQube Cloud setup assistant. The same applies if you selected Limit access to selected groups. If you selected Allow everyone in your organization to access without enabling Federation Broker Mode, or selected Skip group assignment for now, complete all the sub-steps below.

  1. In the Okta Admin Console, go to Applications and Resources > Applications, select your SonarQube Cloud application, and go to Assignments.

  2. Select Assign, then Assign to Groups (or Assign to People to assign individual users instead of groups).

  3. Select the groups to assign to the application.

  4. Select Done.

  5. In the SonarQube Cloud's setup assistant, select Next to go to the step 5. Test SSO.

Step 5: Test SSO

Beyond running the connection test, this step also covers what to check in the results and how to start the optional domain verification.

  1. Select the Test Connection button. The test is started and the results are displayed on the page.

  2. Verify the JSON response. In particular, verify that the email and groups attributes are correct. If the test was successful, select Enable Connection and Proceed.

Test SSO results, with the option to select Enable Connection.
  1. You can now verify your company's email domain to avoid one-time email verification during SSO login. To do so, expand the Domain verification section on the SSO & provisioning page and select Set up domain verification. For detailed instructions, see the Domain verification page.

Next steps

If using Entra ID OIDC

First step of the SonarQube Cloud assistant to set up Entra ID SSO.

Setting up SSO with Microsoft Entra ID moves between two interfaces: the SonarQube Cloud SSO setup assistant (see Start the SSO setup assistant) and the Microsoft Entra admin center. Use the notes below alongside the matching step of the assistant. Microsoft occasionally changes its own interface. Treat the setup assistant as the source of truth for field names and step order, and expect the Microsoft Entra ID labels below to differ slightly from what you see.

Step 1: Create application

The setup assistant walks you through creating the application in Microsoft Entra ID, and the documentation adds no further instructions for this step.

  1. Follow the instructions in the first step of the SonarQube Cloud’s setup assistant.

  2. Select Next to go to step 2. Configure Connection.

Step 2: Configure connection

Use this step to find the Microsoft Entra ID values that the setup assistant asks for, such as the application (client) ID and the domain.

  1. In the setup assistant, paste the secret value copied in the previous step to the Client Secret field.

  2. In your Microsoft Azure application, go to Overview.

  3. In Essentials, copy the Application (client) ID and paste it to the Client ID field in the setup assistant.

  4. Retrieve your domain ID as follows:

    1. In Microsoft Azure, select your account in the top right corner, and select Switch directory in the account menu.

    2. In the list of directories, locate your tenant and copy the value in the Domain column.

    3. Paste this value to the Microsoft Entra ID Domain field in the setup assistant.

Alternatively, retrieve your domain ID from the Settings > Custom domain names page of your application and copy the ID from the Name column.

Azure's Custom domain names page, with the Name column outlined to show the domain ID value to copy.
  1. In the assistant, select Create Connection and then Proceed. SonarQube Cloud is trying to connect to your Identity Provider. If the connection is established, the assistant moves to step 3. Claims Mapping.

Step 3: Claims Mapping

SonarQube Cloud retrieves groups with a Microsoft Graph permission that needs admin consent. Grant that consent before you continue.

  1. Sign in to the Microsoft Entra admin center as an administrator who can grant tenant-wide admin consent. Go to Entra ID > App registrations and select the application you created in step 1.

  2. Select API permissions > Add a permission > Microsoft Graph > Delegated permissions.

  3. Find Directory in the list of permissions (scroll down or enter Directory in the search box) and expand it. Select Directory.Read.All and then select Add permissions. The connection requests two Microsoft Graph permissions: Directory.Read.All and User.Read. Check that User.Read is also listed under Configured permissions. Microsoft adds it when you register an app in the portal.

  4. Select Grant admin consent for your tenant and confirm.

  5. In the setup assistant, select Next. The assistant moves to step 4. Assign Access.

For the requested scopes and your options if you cannot grant consent, see the Microsoft Entra ID: Need Admin Approval error section of the Troubleshooting page.

Step 4: Assign Access

The setup assistant tells you how to assign access to the application you created, and the documentation adds no further instructions for this step.

  1. Follow the instructions in the Specific Users or Groups tab of the setup assistant to assign either all users or a subset of users or groups to the app you created in the first step.

  2. In the assistant, select Next. The assistant moves to step 5. Test SSO.

Step 5: Test SSO

Beyond running the connection test, this step also covers what to check in the results and how to start the optional domain verification.

  1. Select the Test Connection button. The test is started and the results are displayed on the page.

Test SSO results, with the option to select Enable Connection.
  1. Verify the JSON response. In particular, verify the email and groups attributes, and the OID claim. If the test was successful, select Enable Connection and Proceed.

  1. You can now verify your company's email domain to avoid one-time email verification during SSO login. To do so, expand the Domain verification section on the SSO & provisioning page and select Set up domain verification. For detailed instructions, see the Domain verification page.

Next steps

If using Custom SAML

Step 1: Create and set up the SonarQube Cloud application in your identity provider

This step depends on your identity provider.

Okta
  1. In Okta, under Applications, select Create App Integration.

Select SAML 2.0
  1. In the dialog, select SAML 2.0.

  2. Select Next.

  3. Fill in the fields and options as described below.

    • General settings:

      • App name: SonarQube Cloud application name.

        Example: SonarQube Cloud.

      • App visibility: Do not display application icon to users: Select this option. (This is because SonarQube Cloud does not support IdP-initiated SSO)

    • SAML settings:

      • Single sign on URL: Copy-paste the Single Sign-On URL field value from the setup assistant.

      • Audience URI (SP Entity ID): Copy-paste the Service Provider Identity ID field value from the setup assistant.

      • Response: Signed

      • Assertion Signature: Signed

      • Signature Algorithm: RSA-SHA256

    • For assertion encryption:

      • Assertion Encryption: If you want to enable assertion encryption, select Encrypted and fill in the fields below.

      • Encryption Algorithm: Select AES256-GCM for high security.

      • Key Transport Algorithm: RSA-OAEP

      • Encryption Certificate: The public X.509 certificate used by the identity provider to authenticate SAML messages.

  1. In the Feedback dialog, select Finish to confirm the creation of the SonarQube Cloud application.

  2. In the setup assistant, select Next to go to the step 2. Configure Connection.

2. Configure Connection

  1. In Okta’s SonarQube Cloud application, go to Sign On > Settings > Sign on methods. Copy the value of the Metadata URL field

Select the Copy tool to copy the Metadata URL.
  1. Paste the copied value to the Metadata URL field in the Automatic tab of the setup assistant page.

Open the Automatic tab.
  1. In the assistant, select Create Connection and Proceed. SonarQube Cloud is trying to connect to your Identity Provider. If the connection is established, the assistant moves to step 3. Attribute Mapping.

3. Attribute Mapping

  1. In Okta’s SonarQube Cloud application, go to Sign On.

  2. Go down to the Attribute statements section and open the Show legacy configuration panel.

Go down to the Attributes statements section and select the link in Learn more.
  1. Select Edit.

  2. In Profile attribute statements, add the attributes for Name, Login, and Email, and in Group Attribute Statements, add the attribute for Groups, as described below.

    • Name attribute:

      • Name: Copy the attribute's Mapping value from the assistant (use the Copy tool).

      • Name format: Unspecified

      • Value: user.firstName

    • Login attribute:

      • Name: Copy the attribute's Mapping value from the assistant (use the Copy tool).

      • Name format: Unspecified

      • Value: user.login

    • Email attribute:

      • Name: Copy the attribute's Mapping value from the assistant (use the Copy tool).

      • Name format: Unspecified

      • Value: user.email

    • Groups attribute:

      • Name: Copy the attribute's Mapping value from the assistant (use the Copy tool).

      • Name format: Unspecified

      • Filter: Select Matches regex and set the value to .* to synchronize all groups from Okta or use a more restrictive expression depending on your needs.

Select Save.
  1. Select Save.

  2. In the SonarQube Cloud's setup assistant, select Next to go to the step 4. Test SSO. See Set up SSO.

Microsoft Entra ID

Use these notes alongside the setup assistant (see Start the SSO setup assistant). The assistant shows the Service Provider Identity ID and Single Sign-On URL values to copy, and the notes add the application type to choose and the limit of one reply URL.

Proceed as follows:

  1. In Microsoft Entra ID, go to Applications > Enterprise applications > All applications.

  2. Select New application and then Create your own application.

  1. Fill in the name and select the Integrate any other application you don’t find in the gallery option.

  2. Select Create.

  3. From the Manage section of the SonarQube Cloud application, go to Single sign-on > SAML.

  4. In the Basic SAML Configuration section, select Edit, fill in the Identifier and the Reply URL fields as described below, and save:

    • Identifier (Entity ID): Copy-paste the Service Provider Identity ID field value from the setup assistant.

    • Reply URL (Assertion Consumer Service URL): Copy-paste the Single Sign-On URL field value from the setup assistant.

    • Sign On URL (Optional): Until IdP initiated SSO is available, you can use this URL: https://sonarcloud.io/login/sso?enterprise_key=<enterprise_key>.

  1. In the setup assistant, select Next to go to the step 2. Configure Connection.

2. Configure Connection

Use this step to find the metadata URL that the setup assistant asks for.

Open the Automatic tab.
  1. In your SonarQube Cloud application in Microsoft Entra ID, go to SAML Certificates. Copy the value of the App Federation Metadata Url field and paste it into the Metadata URL field in the Automatic tab of the setup assistant page.

  2. In the assistant, select Create Connection and Proceed. SonarQube Cloud is trying to connect to your Identity Provider. If the connection is established, the assistant moves to step 3. Attribute Mapping.

3. Attribute Mapping

  1. In Microsoft Entra ID, go to the Attributes & Claims section of your SonarQube Cloud application.

  2. In most cases, you do not need to change the non-group claims. If you adjust them, note what you changed and compare it with a baseline setup without any changes to verify the change.

  3. Select Add a group claim to define the Groups attribute. Set the parameters as follows:

    • Which groups associated with the user should be returned in the claim?: Groups assigned to the application

    • Source attribute: Cloud-only group display names or (if using on-prem Active Directory for group synchronization) sAMAccountName

    • Emit group name for cloud-only groups option: If you use sAMAccountName, select the option. Otherwise, ignore the option.

The figure below shows a group attribute definition example.

Adding a group claim in Microsoft Entra ID

Save. The option to add a group will be unavailable and the group attribute will be listed with the other attributes in the Additional claims section.

  1. In the setup assistant, select Next to go to the step 4. Test SSO. See Set up SSO.

JumpCloud
  1. In JumpCloud, go to SSO Applications and select + Add New Application.

Select Add New Application to create your SonarQube Cloud application in JumpCloud.
  1. Select Custom Application and select Next.

To create your SonarQube Cloud app in JumpCloud, select Custom Application.
  1. Click Next.

  2. Select Manage Single Sign-On (SSO) and Configure SSO with SAML, and select Next.

Select Manage Single Sign-On (SSO) and Configure SSO with SAML.
  1. Enter a display label and select Save Application. The application is created.

Enter a display label and select the Save Application button.
  1. Select Configure Application.

  2. In the SSO tab, in the Configuration Settings section, set the parameters as described below:

    • IdP Entity ID: Do not change the default value.

    • SP Entity ID: Copy-paste the Single Sign-On URL field value from the setup assistant.

    • ACS URL: Copy-paste the Single Sign-On URL field value from the setup assistant to Default URL.

Set the SP Entity ID and Default URL fields with the SSO URL value from SonarQube Cloud.
  1. In JumpCloud Metadata in the same section, select the Copy Metadata URL button.

Select the Copy Metadata URL button.
  1. In SonarQube Cloud's SAML SSO setup assistant, go to the step 2. Configure Connection and paste the copied value to Metadata URL in the Automatic tab.

Paste the value copied from JumpCloud to Metadata URL.
  1. Select Create Connection and then Proceed.

  2. In SonarQube Cloud's SAML SSO setup assistant, go to the step 3. Attribute Mapping.

  3. In the SSO tab of the JumpCloud's application, go to the Attributes > User Attributes section and add three new attributes with the values described below:

    • Name attribute:

      • Service Provider Attribute Name: Paste the name copied from the Mapping value in SonarQube Cloud's setup assistant.

      • JumpCloud Atttribute Name: username

    • Login attribute:

      • Service Provider Attribute Name: Paste the name copied from the Mapping value in SonarQube Cloud's setup assistant.

      • JumpCloud Atttribute Name: displayname

    • Email attribute:

      • Service Provider Attribute Name: Paste the name copied from the Mapping value in SonarQube Cloud's setup assistant.

      • JumpCloud Atttribute Name: email

  4. Under the Constant Attributes section, select the Include Group Attribute option. Copy the group attribute name from the assistant and paste it into Groups Attribute Name.

Add and configure user attributes and a group attribute.
  1. Select Save.

  2. In SonarQube Cloud's SAML SSO setup assistant, select Next to go to step 4. Test SSO. See Set up SSO below.

Other identity providers
  1. Create the SonarQube Cloud application in your identity provider.

  2. Copy the Service Provider Identity ID field value from the setup assistant and paste it into the corresponding field in your identity provider.

  3. Copy the Single Sign-On URL field value from the setup assistant and paste it into the corresponding field in your identity provider.

  1. In SonarQube Cloud's SSO setup assistant, select Next to go to the step 2. Configure Connection.

The first step of the SonarQube Cloud's SAML SSO setup assistant is Create Application.

2. Configure Connection

The operation is different depending on whether your identity provider supports the SAML metadata URL field (URL used by SonarQube Cloud to access metadata information) or not.

Metadata URL supported

  1. In your SonarQube Cloud application in your identity provider, copy the value of the field corresponding to the SAML metadata URL .

  2. Paste it into the Metadata URL field in the Automatic tab of the setup assistant page.

Open the Automatic tab.
  1. In the assistant, select Create Connection and Proceed. SonarQube Cloud is trying to connect to your Identity Provider. If the connection is established, the assistant moves to step 3. Attribute Mapping.

Metadata URL not supported

  1. In the assistant, select the Manual tab.

Open the Manual tab.
  1. In your identity provider, copy the value of the SSO login URL field and paste it into Single Sign-On Login URL in the assistant.

  2. In your identity provider, download the certificate and upload it to the assistant.

  3. In the assistant, select Create Connection and Proceed. SonarQube Cloud is trying to connect to your Identity Provider. If the connection is established, the assistant moves to step 3. Attribute Mapping.

3. Attribute Mapping

  1. In your identity provider, create the attributes for Name, Login, Email, and Groups (the group attribute is used for automatic group synchronization). To do so, for each attribute, copy the attribute's Mapping value from the assistant (use the Copy tool) and paste it into the attribute’s name field in your identity provider.

Select Next to go to the next step.
  1. In the assistant, select Next to go to step 4. Test SSO. See Set up SSO.

Step 2: Test the SSO connection

  1. In your identity provider, assign the user groups to the SonarQube Cloud application (to be able to perform the test, at least one group or user must be assigned).

  1. In the SonarQube Cloud's setup assistant, select the Test Connection button. The test is started and the results are displayed on the page as illustrated below.Step b: Test the SSO connection

Before you finish step 2 configuring your connection using SonarQube Cloud's setup assistant, test and enable your configuration.
  1. If the test was successful, select Enable Connection and Proceed.

  2. You can now verify your company's email domain to avoid one-time email verification during SSO login. To do so, expand the Domain verification section on the SSO & provisioning page and select Set up domain verification. For detailed instructions, see the Domain verification page.

Next steps

If using Custom OIDC

Select Custom OIDC in the SSO setup assistant if your identity provider is not listed under Select Your Identity Provider, and follow its instructions.

You need the following from your identity provider:

  • The URL of its OpenID Connect discovery document, which you enter in the OpenID Provider Configuration Endpoint field.

  • The Client ID and Client Secret of the application you create.

The assistant shows the Callback URL to paste into your identity provider. Some providers call this field Sign-in Redirect URI or Login Redirect URI.

Regardless of your chosen provisioning method, you must configure the groups attribute in the OIDC payload. On the Claims Mapping step, your identity provider must send the Email, Groups, Login, and Name claims that the assistant lists. SonarQube Cloud uses Groups to synchronize organization memberships. See Group setup is mandatory for more details.

On the Test SSO step, select Test Connection and check the result before you select Enable Connection.

After you enable the connection, you can verify your company's email domain. See the Domain verification page.

Next steps

Last updated

Was this helpful?