# Azure DevOps

The integration is compatible with both Azure DevOps Server and Azure DevOps Services.

{% hint style="success" %}
To bind your SonarQube Server instance to Azure DevOps, see [Binding to Azure DevOps](/sonarqube-server/instance-administration/devops-platforms/azure-devops.md).
{% endhint %}

### Key features

With this integration, you’ll be able to:

* Import your Azure DevOps repositories into SonarQube Server to easily set up SonarQube Server projects.
* Smoothly integrate your SonarQube Server analysis into your Azure build pipeline with our [Azure DevOps Extension](/sonarqube-server/analyzing-source-code/scanners/sonarqube-extension-for-azure-devops.md). This includes multi-branch analysis features.
* Report the analysis’ quality gate status right in Azure Pipeline’s Build Summary page.
* Report your quality gate status to your merge requests: see your quality gate and code metric results right in Azure Pipeline’s Build Summary page so you know if it’s safe to merge your changes; prevent pull request merges when the quality gate fails.
* Use your SonarQube quality gate status to block your Azure DevOps release pipeline.
* View issues detected on a pull request in Azure DevOps.\
  Each issue will be a comment on the Azure DevOps pull request. If you change the status of an issue in SonarQube Server, that status change is immediately reflected in the Azure DevOps interface.

<figure><img src="/spaces/KXW79zfYFiA8incTvwZK/files/PAS54JGJ89YZkbKHyMfH" alt="SonarQube integration with Azure DevOps is done based on Azure DevOps extension for SonarQube."><figcaption></figcaption></figure>

{% hint style="info" %}
Check out this [video](https://www.youtube.com/watch?v=oYvMmN6G3F0) on SonarQube Server integration with Azure DevOps.
{% endhint %}

### Integration solution overview <a href="#related-pages" id="related-pages"></a>

Integration is performed at two levels:

* Global: Within your SonarQube instance, an “Azure DevOps Configuration” record is used to manage the SonarQube access to your Azure DevOps Services organization or Azure DevOps Server collection. This record stores:
  * Your organization’s or collection’s URL.
  * An Azure DevOps Personal Access Token (PAT) which is used by SonarQube to access your Azure DevOps Services organization or Azure DevOps Server collection. This PAT is usually created from a dedicated technical account.
* Project: A project administrator must provide Azure DevOps PAT to import their Azure DevOps repository to SonarQube. SonarQube stores this PAT in its database, enabling it to list and import the repositories the administrator can access.

It means that SonarQube uses two different Azure DevOps PATs:

* The global PAT to access your organization or collection in order to import repositories or report the quality gate status in Azure Pipelines.
* The project PAT to check the user's permissions on repositories when a user imports Azure DevOps repositories.

<figure><img src="/spaces/KXW79zfYFiA8incTvwZK/files/XaLuXMlron09YTfWpCsJ" alt="Two different Azure DevOps PATs are used for SonarQube Server integration with Azure DevOps."><figcaption></figcaption></figure>

### Related pages <a href="#related-pages" id="related-pages"></a>

* [About Azure Pipelines integration](/sonarqube-server/analyzing-source-code/ci-integration/azure-pipelines/integration-overview.md)
* [Binding to Azure DevOps](/sonarqube-server/instance-administration/devops-platforms/azure-devops.md)
* [Importing your Azure DevOps repository](/sonarqube-server/project-administration/creating-project/azure-devops/import-repos.md)
* [Setting up Azure integration for your project](/sonarqube-server/project-administration/creating-project/azure-devops/setting-up-project-integration.md)
* [Azure Pipelines](/sonarqube-server/analyzing-source-code/ci-integration/azure-pipelines.md) (adding analysis to your pipeline)
* [Troubleshooting analysis with Azure](/sonarqube-server/analyzing-source-code/ci-integration/azure-pipelines/troubleshooting-analysis.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sonarsource.com/sonarqube-server/discovering/devops-platforms/azure-devops.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
