--- title: Configure SonarQube scans on Azure DevOps pipelines description: Configure SonarQube or SonarCloud scans on MS Azure DevOps pipelines. Check Azure DevOps pipeline executions for SonarQube scans on every stage of the pipeline's execution and fetch lists and details of scans from any stage to DevOps Change Velocity. Drill down on the Scan Details based on categories. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/it-service-management/devops-change-velocity/config-sonarqube-azure-devops.html release: australia product: DevOps Change Velocity classification: devops-change-velocity topic_type: task last_updated: "2026-03-12" reading_time_minutes: 4 breadcrumb: [Azure DevOps, Integrate, DevOps Change Velocity, IT Service Management] --- # Configure SonarQube scans on Azure DevOps pipelines Configure SonarQube or SonarCloud scans on MS Azure DevOps pipelines. Check Azure DevOps pipeline executions for SonarQube scans on every stage of the pipeline's execution and fetch lists and details of scans from any stage to DevOps Change Velocity. Drill down on the Scan Details based on categories. ## Before you begin Ensure that you meet the following prerequisites before you configure SonarQube scans on your Azure DevOps pipeline: - You are using a compatible SonarQube version. See [DevOps Change Velocity integrations](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/devops-change-velocity/dev-ops-overview.md) for supported tool versions. - Connect, configure the Azure DevOps tool and discover existing repositories, orchestration tasks, and pipelines. - Create a SonarQube tool record. For more information, see [SonarQube integration with DevOps Change Velocity](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/devops-change-velocity/sonarqube-devops-integration-devops.md). - Install the SonarQube extension from the Visual Studio Marketplace and configure branch analysis to use the Azure Devops tasks in your build definitions to analyze your projects. For more information, see [SonarQube documentation](https://docs.sonarqube.org/latest/analysis/azuredevops-integration/). - Install the following custom extension tasks on your Azure DevOps instance. - ServiceNow extension to integrate Azure Pipelines with DevOps Change Velocity. For more information, see [Use the ServiceNow DevOps extension for Azure DevOps and Azure DevOps custom actions](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/devops-change-velocity/config-dev-ops-extensions-azure.md). - ServiceNow DevOps Build Sonar Registration \(for Build pipelines\) - ServiceNow DevOps Release Sonar Registration task \(for Release pipelines\) Role required: - admin or sn\_devops.admin in DevOps Change Velocity - admin in Azure DevOps - admin role in SonarQube with access to all projects that the SonarQube scans are configured on. ## About this task By default, Azure DevOps provides you with the following tasks to run a SonarQube scan on build and release pipelines: - Prepare analysis on SonarCloud - Run Code analysis - Publish Quality Gate Result Add and configure custom ServiceNow extension tasks in order to them default tasks, to fetch the scan details to ServiceNow DevOps from Azure DevOps build and release pipelines. The scan details that are fetched are: - pipelineName - buildNumber - stageName - branchName - sonarProjectKey - sonarInstanceUrl ## Procedure 1. Set up and configure the Azure DevOps and SonarQube Integration to fetch scan analysis from Build pipelines. 1. In the Azure DevOps console, navigate to **Organization** > **SonarIntegrations** > **Pipelines** > **Jobs**. 2. Click the **Add Tasks** icon \(\[Omitted image "add-task-ado-sonar.png"\] Alt text: Add additional tasks\), and search for the ServiceNow extensions in the **Add tasks** search bar. 3. Add the following tasks. - ServiceNow DevOps Build Sonar Registration task. - ServiceNow DevOps Release Sonar Registration task. 4. On the form, fill in the fields.
| Field | Description |
|---|---|
| Display name | Auto-populates on entering key and URL. |
| ServiceNow endpoint | The ServiceNow instance endpoint that is automatically created during Tool configuration. Use the same service connection for this task. |
| Sonar project Key | Enter the same project key value which you used while configuring the **Prepare analysis on SonarCloud** task. |
| Sonar Instance Url | Enter the same URL which you used to connect to the Sonar tool during tool creation. |
| Job Name | The name of the Azure DevOps pipeline job. This field appears only for the **ServiceNow DevOps Release Sonar Registration** task. |