# Setting up project integration

## Adding SonarQube Community Build service connection to Azure Pipelines (SonarQube Community Build endpoint) <a href="#adding-sonarqube-service-connection" id="adding-sonarqube-service-connection"></a>

Service connections are authenticated connections between Azure Pipelines and external or remote services. You must declare your SonarQube Community Build as a service connection in your Azure DevOps project.

Proceed as follows:

1. In SonarQube Community Build, create an authentication token that will be used by Azure DevOps to execute the analysis of your project in SonarQube Community Build. To do so, create a Project analysis token for your project *and copy it* (you may also use a Global analysis token, but it’s not recommended). For more information, see [managing-tokens](https://docs.sonarsource.com/sonarqube-community-build/user-guide/managing-tokens "mention").
2. In your Azure DevOps project, go to **Project Settings** > **Service connections**.
3. Select **New service connection** and then select **SonarQube Server** from the service connection list.

   <div align="left"><figure><img src="https://1580440648-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbqrfLGeD0Y9vE5l9Le42%2Fuploads%2Fgit-blob-530458512a9497bee448d0d9d2732a08c1412e04%2Fsonarqube-new-azure-connection.png?alt=media" alt="Search for &#x22;sonar&#x22; when adding a new service connection to your Azure DevOps pipeline." width="242"><figcaption></figcaption></figure></div>
4. Enter your SonarQube Community Build URL, the token created in the first step, and a memorable **Service connection name** (You will need this name when configuring your Azure build pipelines). Then, select **Save** to save your connection.

<figure><img src="https://1580440648-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbqrfLGeD0Y9vE5l9Le42%2Fuploads%2FtqlybOsq4pI2G3DaIJ5g%2Fazure-devops-sonarqube-service-connection.png?alt=media&#x26;token=4d7469aa-f34d-4c5a-9907-aa86c00c474b" alt="Define your SonarQube connection name when building your Azure pipeline." width="563"><figcaption></figcaption></figure>

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

* [azure-pipelines-integration-overview](https://docs.sonarsource.com/sonarqube-community-build/devops-platform-integration/azure-devops-integration/azure-pipelines-integration-overview "mention")
* [setting-up-integration-at-global-level](https://docs.sonarsource.com/sonarqube-community-build/devops-platform-integration/azure-devops-integration/setting-up-integration-at-global-level "mention")
* [creating-your-project](https://docs.sonarsource.com/sonarqube-community-build/devops-platform-integration/azure-devops-integration/creating-your-project "mention")
* [adding-analysis-to-pipeline](https://docs.sonarsource.com/sonarqube-community-build/devops-platform-integration/azure-devops-integration/adding-analysis-to-pipeline "mention")
* [troubleshooting-analysis](https://docs.sonarsource.com/sonarqube-community-build/devops-platform-integration/azure-devops-integration/troubleshooting-analysis "mention")
