Start FreeLog in
SonarQube Cloud | Administering SonarQube Cloud | Creating and editing your organization | Importing Azure DevOps organization

Importing an Azure DevOps organization

On this page

When you import an Azure DevOps organization to SonarQube Cloud, the corresponding organization is created in SonarQube Cloud and is bound to the DevOps platform organization: each SonarQube Cloud organization corresponds one-to-one with an Azure DevOps organization. 

The user account you used for the import is automatically assigned to the organization’s Owners group which grants you administration rights on the organization. 

Prerequisites

You must be an administrator of the Azure DevOps organization.

Step 1: Create a PAT on the Azure organization

SonarQube Cloud uses an Azure DevOps user account to import your Azure DevOps organization and repositories. You must provide a Personal Access Token (PAT) from this account (The PAT will be stored in the respective SonarQube Cloud organization.). We highly recommend that you use a dedicated technical user account in Azure DevOps.

About the Azure PATs

Be aware of the following PAT failure points: 

  • Azure PATs require an expiration date. Check the Microsoft documentation for details when creating your PAT.
  • Azure requires that a user log in every 30 days, or it automatically kills a PAT; this action may cause your related pipeline to fail. Here is an Azure Q&A on this topic. 
Creating a technical user account

We highly recommend that you use a dedicated technical user account in Azure DevOps to manage the integration with SonarQube.

  • Do not set the technical user’s account with a Stakeholder access type. Use the Basic access type instead. (Users with the Stakeholder access type can have problems finding their repos when trying to analyze projects.) 
  • We recommend that you add the account to the Contributors security group.

See the Azure documentation for more information about access levels.

Generating your Azure PAT

1. Log in to Azure DevOps with the technical user account created before.

2. Go to your Azure DevOps organization User settings > Personal access tokens and select + New token.

Create your first personal access token in Azure.

3. On the next page, under Scopes, make sure that you specify at least the scope Code > Read & write.

Set the scope of your new personal access token in Azure.

4. Click Create to generate the token.

5. When the personal access token is displayed, copy it (you will have to paste it to SonarQube's configuration record as described below).

Step 2: Import your Azure organization

To import your Azure organization to SonarQube Cloud:

  1. Log in to SonarQube Cloud with any DevOps platform account or your SAML SSO account. If you don't use your Azure DevOps account, see Importing organizations from multiple DevOps platforms for important insights.
  2. At the top right of the SonarQube Cloud interface, select the ✚ (plus) menu and select Create new organization. The Create an organization page opens.
  3. Under Import from a DevOps platform, select the Azure DevOps button.
  4. Follow the instructions.
  5. Paste the PAT you created in Step 1 to Personal Access Token,.
  6. Select Continue.
  7. In Import organization details, SonarQube Cloud suggests a Name and Key for your SonarQube Cloud organization. The key is unique across all organizations within SonarQube Cloud. You can accept the suggestion or change it manually. The interface will prevent you from changing it to an already existing key. 
  8. Select Add additional info to add:
    • An avatar: a small image representing the organization and displayed on the UI near the organization name.
    • A description of the organization.
    • A URL: the URL of the homepage of the organization displayed on the UI.
  9. In Choose a plan, select the subscription plan for your organization.
  10. If you selected a paid plan, select the number of Lines of Code (LOC) for your plan and follow the instructions to enter your billing and payment information.
  11. Select Create Organization. The organization is created and opened in SonarQube Cloud.

Was this page helpful?

© 2008-2025 SonarSource SA. All rights reserved. SONAR, SONARSOURCE, SONARQUBE, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License