# Azure DevOps

## Overview

Copia’s Azure DevOps webhook integration lets teams using [Boards and Work Items ](https://learn.microsoft.com/en-us/azure/devops/boards/backlogs/manage-work-items?view=azure-devops\&tabs=browser)automatically receive updates when those items are referenced in Copia. If a commit message or Pull Request comment includes `#<WORK_ITEM_ID>`, a comment is added to the corresponding Azure Work Item with a direct link to the mention in Copia. The example below shows how this comment appears in Azure.

This integration makes it simple to navigate from Azure DevOps Work Items into Copia. To enable the reverse—fast navigation from Copia to Azure DevOps—we recommend configuring the [External Issue Tracker in the repository settings.](/docs/git-based-source-control/administration/settings.md#managing-advanced-settings)

<figure><img src="/files/trgGBd6LIm5lX9DeJU9L" alt="Example Azure DevOps Work Item comment posted via the Copia integration."><figcaption></figcaption></figure>

### Configure Azure DevOps

In order to access Azure DevOps’ API, you will need to provide an access token from Azure DevOps. You can generate one using the following steps.&#x20;

{% hint style="warning" %}
**Note:** Copia will perform all actions on behalf of the user who created the token. As such, it is recommended to use a separate account specifically for Copia.
{% endhint %}

Navigate to your Azure DevOps personal access tokens settings by clicking the user settings icon in the navbar and clicking *Personal access tokens*:

<figure><img src="/files/VOOeBarqxUYDB4KJ0r4i" alt=""><figcaption></figcaption></figure>

Create a new access token using the New Token button in the top right:

<figure><img src="/files/19nKYoXFyN16RT1P2vai" alt=""><figcaption></figcaption></figure>

Use the following settings for the access token:

<figure><img src="/files/uEiDDodLu5fOzPHgMQWL" alt=""><figcaption></figcaption></figure>

* **Name:** Any meaningful name
* **Organization:** The organization you’d like to grant Copia access to
* **Expiration:** Select an expiration date you’d like to set for this token.
  * Note that when this token expires, you will need to reconfigure Copia’s webhooks to use a new, non-expired token. Azure DevOps currently doesn't allow you to set the expiry date any longer than a year.
* **Scopes:** Custom defined
* **Work Items:** Read, write, & manage

Once you've filled out the above fields, click the *Create* button at the bottom of the page. Copy the newly generated token to use in the next step.

<figure><img src="/files/oI1WArPPuIUvC0wOvsQ5" alt=""><figcaption></figcaption></figure>

### Create a Webhook in Copia

Choose the repository you want to create an integration for. Navigate to the *Settings* tab and choose the *Webhooks* section. Click on the *Add Webhook* button and select the *Azure DevOps* option.

<figure><img src="/files/WDNAVkZMShQHDDKWzedx" alt=""><figcaption></figcaption></figure>

Fill the webhook form:

<figure><img src="/files/VzPM5JvUHjBNLKZD2X7u" alt=""><figcaption></figcaption></figure>

* **Target URL:** The URL to your Azure DevOps instance.
  * For the multi-tenant cloud Azure DevOps this is usually `https://dev.azure.com/`
* **Organization:** The name of the Azure DevOps organization you'd like to connect with Copia.
* **Token:** The Personal access token generated in the previous step.

Click *Add Webhook* to complete the form.

{% hint style="info" %}
**Note:** The Azure DevOps webhook can also be configured at the Organization level. Be aware that this will apply to *all* repositories in your Org.
{% endhint %}


---

# 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.copia.io/docs/git-based-source-control/integrations/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.
