Setting up project integration
This page explains project-level settings required if you use Azure Pipelines for your project analysis.
Adding SonarQube service connection to Azure Pipelines (SonarQube endpoint)
Service connections are authenticated connections between Azure Pipelines and external or remote services. You must declare your SonarQube Cloud as a service connection in your Azure DevOps project.
Proceed as follows:
In SonarQube Cloud, create an authentication token that will be used by Azure DevOps to execute the analysis of your project in SonarQube Cloud. To do so, create a token and copy it. For more information, see:
From the Team plan: Managing Scoped Organization Tokens.
With the Free plan: Managing Personal Access Tokens.
In your Azure DevOps project, go to Project Settings > Service connections.
Select New service connection and then select SonarQube Cloud from the service connection list.

Set the parameters:
In Region (optional) field, make sure Global is selected (default value).
In SonarQube Cloud Token, enter the token created in the first step.
In Service Connection Name, enter a memorable name (You will need this name when configuring your Azure build pipelines).
Select Save to save your connection.
Enabling the pull request analysis in your build pipeline
The Azure DevOps extension running in your Azure pipeline can automatically detect branches or pull requests being built (you don't need to pass them as parameters to the scanner).
To enable the pull request analysis in your Azure pipeline of code stored on Azure DevOps, you must configure a pull request trigger on the target branch (main development branch) as explained on the Azure DevOps page. If your code is stored on GitHub or Bitbucket Cloud, open the expandable content below.
Last updated
Was this helpful?