Setting up integration at global level
Setting up integration of Azure DevOps with SonarQube Server at the global level.
For the integration of an Azure DevOps Services organization or an Azure DevOps Server collection with SonarQube Server, you must:
Create a configuration record in SonarQube Server. This record stores the Personal Access Token (PAT) of the technical account used by SonarQube Server to connect to Azure DevOps. This is necessary for importing Azure DevOps repositories and reporting the quality gate status.
Install an Azure DevOps Extension for SonarQube Server on the CI/CD host to integrate with Azure Pipelines.

Prerequisites
See Installation requirements for Azure DevOps extension.
The SonarQube Server base URL must be properly set, otherwise, integration features will not work correctly. See Server base URL.
Preparing the integration
SonarQube Server uses an Azure DevOps user account to import Azure DevOps repositories to SonarQube Server and report the quality gate status to Azure DevOps. You must provide a Personal Access Token (PAT) from this account.
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 the global configuration record in SonarQube Server
You need the global System Administration permission to perform this procedure.
In SonarQube Server, a global configuration record stores the parameters necessary to connect to your Azure DevOps Server collection or Azure DevOps Services organization*.*
To create the Azure DevOps configuration record in SonarQube:
Go to Administration > Configuration > General Settings > DevOps Platform Integrations.
Select the Azure DevOps tab.
Select the Create configuration button. The Create a configuration dialog opens.
Specify the settings as described below.
Field
Description
Configuration Name
Enterprise and Data Center edition only. The name used to identify your Azure DevOps configuration at the project level. Use something succinct and easily recognizable.
Azure DevOps URL
• If you are using Azure DevOps Server: the full Azure DevOps collection URL. For example, https://ado.your-company.com/DefaultCollection.
• If you are using Azure DevOps Services: the full Azure DevOps organization URL. For example, https://dev.azure.com/your_organization.
Personal Access Token
Personal access token generated in Generating your Azure PAT above (or its encrypted value).
Installing the Azure DevOps Extension for SonarQube
Related pages
Last updated
Was this helpful?