# 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 your tokens](/sonarqube-community-build/user-guide/managing-tokens.md).
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="/files/nWFk4EhmD2LcYeRin8OT" 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="/files/OnQHIRKCkrRaigViwlAZ" 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](/sonarqube-community-build/devops-platform-integration/azure-devops-integration/azure-pipelines-integration-overview.md)
* [Setting up Azure DevOps integration at global level](/sonarqube-community-build/devops-platform-integration/azure-devops-integration/setting-up-integration-at-global-level.md)
* [Creating and configuring your Azure DevOps project](/sonarqube-community-build/devops-platform-integration/azure-devops-integration/creating-your-project.md)
* [Adding analysis to Azure pipeline](/sonarqube-community-build/devops-platform-integration/azure-devops-integration/adding-analysis-to-pipeline.md)
* [Troubleshooting analysis](/sonarqube-community-build/devops-platform-integration/azure-devops-integration/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-community-build/devops-platform-integration/azure-devops-integration/project-integation.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.
