---
title: "Azure DevOps Pipelines"
canonical_url: "https://docs.getdx.com/connectors/azure-devops-pipelines/"
md_url: "https://docs.getdx.com/connectors/azure-devops-pipelines.md"
last_updated: "2026-09-10"
---

# Azure DevOps Pipelines
By integrating Azure DevOps Pipelines with DX, you can analyze pipelines data. Please refer to the API documentation below and our [schema explorer](https://docs.getdx.com/schema/) to see what data DX imports—note that DX does not read or access your source code.

Before proceeding, please make sure that you have first enabled the Azure DevOps Repositories connector by following the steps [here](https://docs.getdx.com/connectors/azure-devops/). Each Azure DevOps credential in DX should utilize a separate service account and API token to avoid rate limit issues.

## Prerequisites

To connect Azure DevOps to DX, you need:

- an ADO service account
- personal access token (PAT) with expiration date

## Setup instructions


> This connector supports multiple credentials. You can add additional credentials to distribute API requests across multiple tokens, improving import speed and reliability. To learn more, go to [Can I use multiple API credentials for a data connector?](https://docs.getdx.com/knowledgebase/can-i-use-multiple-api-credentials-for-a-data-connector/)


Follow the steps below to connect Azure DevOps Pipelines to DX.

### Data connection

#### Step 1

1. Go to the [Azure portal](https://portal.azure.com/) and create a service account in Microsoft Entra ID (formerly Azure Active Directory).
2. Then, assign the service account to an ADO organization and grant them permissions.
   - See [Add organization users and manage access](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/add-organization-users?view=azure-devops&tabs=browser) and [Security groups, service accounts, and permissions reference](https://learn.microsoft.com/en-us/azure/devops/organizations/security/permissions?view=azure-devops&tabs=preview-page) for more information.

#### Step 2

1. Log into ADO using the service account
2. Generate a Personal Access Token with the read permissions outlined below:

| Permissions                                                                                                                    |
| ------------------------------------------------------------------------------------------------------------------------------ |
| - Build (read)<br>- Graph (read)<br>- Identity (read)<br>- Project and Team (read)<br>- Release (read)<br>- Task Groups (read) |

<aside class="aside flow info"><p>DX requests the same base scopes for multiple connections since it allows each connection to work independently to get the core data for projects, teams etc.</p></aside>

#### Step 3

- Navigate to the connections page in DX and select "+ Connection" in the top right.
- Enter the credentials you have generated in the previous steps—refer to the information below for errors and troubleshooting.

## API reference

The table below lists the specific API endpoints that are used by DX.


| Endpoint | Documentation |
|---------------------------------------------------------------------------------------------------|-----------------------------|
| /graph/users | [Link](https://learn.microsoft.com/en-us/rest/api/azure/devops/graph/users) |
| /projects | [Link](https://learn.microsoft.com/en-us/rest/api/azure/devops/core/projects/list) |
| /projects/{projectId}/teams | [Link](https://learn.microsoft.com/en-us/rest/api/azure/devops/core/teams/list) |
| /projects/{projectId}/teams/{teamId}/members | [Link](https://learn.microsoft.com/en-us/rest/api/azure/devops/core/teams/get-team-members) |
| /build/builds?project={projectId} | [Link](https://learn.microsoft.com/en-us/rest/api/azure/devops/build/builds) |
| /build/builds/{buildId} | [Link](https://learn.microsoft.com/en-us/rest/api/azure/devops/build/builds/get) |
| /build/builds/{buildId}/timeline | [Link](https://learn.microsoft.com/en-us/rest/api/azure/devops/build/timeline) |
| /release/releases?project={projectId} | [Link](https://learn.microsoft.com/en-us/rest/api/azure/devops/release/releases) |
| /release/releases/{releaseId} | [Link](https://learn.microsoft.com/en-us/rest/api/azure/devops/release/releases/get) |


## Curl commands

When DX verifies an Azure DevOps Pipelines connection, it checks specific endpoints to ensure proper access. If your connection is failing, you can test these endpoints directly using the curl commands below to troubleshoot the issue.

<div>
  <p class="mb-4 text-sm text-gray-700">Replace YOUR_ORGANIZATION and YOUR_PAT with your actual values before running these commands.</p>

  <h4>1. Test Project Access</h4>
  <p>This verifies that your service account can access project information:</p>
  <div class="code-block-wrapper">
    <button class="copy-button" title="Copy to clipboard">
      <svg class="copy-icon" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>
      <svg class="check-icon" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>
    </button>
    <pre><code class="language-bash">curl -u :YOUR_PAT -H 'Accept: application/json' 'https://dev.azure.com/YOUR_ORGANIZATION/_apis/projects?api-version=7.0'</code></pre>
  </div>

  <h4>2. Test User Access</h4>
  <p>This verifies that your service account can access user information:</p>
  <div class="code-block-wrapper">
    <button class="copy-button" title="Copy to clipboard">
      <svg class="copy-icon" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>
      <svg class="check-icon" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>
    </button>
    <pre><code class="language-bash">curl -u :YOUR_PAT -H 'Accept: application/json' 'https://dev.azure.com/YOUR_ORGANIZATION/_apis/graph/users?api-version=7.0'</code></pre>
  </div>

  <h4>3. Test Build Pipelines</h4>
  <p>Replace YOUR_PROJECT_ID with a valid project ID to verify pipeline access:</p>
  <div class="code-block-wrapper">
    <button class="copy-button" title="Copy to clipboard">
      <svg class="copy-icon" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>
      <svg class="check-icon" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>
    </button>
    <pre><code class="language-bash">curl -u :YOUR_PAT -H 'Accept: application/json' 'https://dev.azure.com/YOUR_ORGANIZATION/_apis/build/builds?projectId=YOUR_PROJECT_ID&api-version=7.0'</code></pre>
  </div>
</div>

If you receive a 401 Unauthorized error, your credentials are invalid. If you receive a 403 Forbidden error, your token doesn't have the required permissions. If you receive a 404 Not Found error or empty results, check that your organization name is correct.

**Note about Authentication**: The `-u :YOUR_PAT` flag uses curl's built-in basic authentication with an empty username and your Personal Access Token as the password. This automatically handles the Base64 encoding required for Azure DevOps authentication.

## Errors

The table below lists potential error codes when adding a connection in DX.


| Error | Description |
|------------------------|--------------------------------------------------------------------------|
| `invalid_credentials` | Your API credentials entered are not valid. |
| `invalid_permissions` | Your API token does not have the permissions required by DX. |
| `no_resources` | DX cannot access any projects or repositories. |


## Data Cloud API

Once the initial connection is created successfully, credentials can be managed via the Data Cloud API. This connector uses the same credential fields as [Azure DevOps Repositories](https://docs.getdx.com/connectors/azure-devops/#credential-fields) (`secrets.personal_access_token`).

- [credentials.create](https://docs.getdx.com/datacloudapi/methods/credentials.create/)
- [credentials.update](https://docs.getdx.com/datacloudapi/methods/credentials.update/)
- [credentials.info](https://docs.getdx.com/datacloudapi/methods/credentials.info/)
- [credentials.list](https://docs.getdx.com/datacloudapi/methods/credentials.list/)
- [credentials.delete](https://docs.getdx.com/datacloudapi/methods/credentials.delete/)
---

## Sitemap

[Overview of all docs pages](/llms.txt)
