---
title: Azure DevOps Source Code
description: >-
  Azure DevOps is a web-based hosting service for software development projects
  that use the Git revision control system.
breadcrumbs: Docs > Integrations > Azure DevOps Source Code
---

# Azure DevOps Source Code
Integration version1.0.0
## Overview{% #overview %}

Integrate Datadog with your Azure DevOps repositories to streamline troubleshooting of code issues and get suggested changes on your source code.

Get context-relevant code snippets while investigating issues in Error Tracking, Continuous Profiler, Code Security, and many more areas within Datadog.

Protect your production code base with pull request comments from Code Security, Test Optimization, and CI Visibility that provide automated code reviews and suggested changes.



### Source code functionality{% #source-code-functionality %}

When installed with the correct permissions, this integration powers [source code integration](https://docs.datadoghq.com/integrations/guide/source-code-integration/) features across Datadog to help you troubleshoot and take action on your code:

- See code snippets in your stack traces to identify where code problems originate. This can speed up investigations in Error Tracking, Continuous Profiler, Dynamic Instrumentation, and Live Debugger.
- Streamline code reviews with automated feedback and suggested changes from [Code Security](https://docs.datadoghq.com/security/code_security/dev_tool_int/github_pull_requests/) and [Test Optimization](https://docs.datadoghq.com/continuous_integration/guides/pull_request_comments/), posted directly on pull requests.

### Azure DevOps pipelines{% #azure-devops-pipelines %}

For more in-depth monitoring of your Azure DevOps Pipelines, check out [CI Pipeline Visibility](https://app.datadoghq.com/ci/getting-started). CI Pipeline Visibility provides granular insights into your user workflow, lets you access detailed Git metadata, and tracks pipeline performance over time.

## Setup{% #setup %}

{% alert level="info" %}
Some features require additional setup beyond installing the Azure DevOps Source Code integration. Installing the integration connects your Azure DevOps repositories to Datadog and grants only the permissions and access required as prerequisites for supported features. It doesn't enable any billable functionality by default, and you only incur additional charges if you explicitly configure a paid feature.
{% /alert %}

{% alert level="warning" %}
To use this integration, you must be using the cloud version of Azure DevOps, and your Azure DevOps organizations must be connected to a Microsoft Entra tenant. Azure DevOps Server is **not** supported.
{% /alert %}

### Connect Microsoft Entra app{% #connect-microsoft-entra-app %}

1. In the [Azure DevOps Source Code integration tile](https://app.datadoghq.com/integrations/azure-devops-source-code/), navigate to the **Configuration** tab.
1. Click **Connect Microsoft Entra App**.
1. Under **Register an Entra App**, click the link to go to the Azure portal and create a new App Registration with these settings:
   - The supported account types must be **Accounts in this organizational directory only (Single tenant)**.
   - Set the Redirect URI platform to **Web**, then copy and paste the callback URL from the Datadog UI into the field.
1. Paste the App Registration's **Application (client) ID** and **Directory (tenant) ID** into the respective fields in Datadog.
1. Follow the link to the **Application API Client Secrets** page in the Azure portal to create a new client secret. Copy the string in the Value column of the client secret table and paste it into the **Value** field in Datadog.
1. Follow the link to the **API Permissions** page in the Azure portal, click **Add a permission**, then select **Azure DevOps** and add the following permissions:
   - `vso.build`
   - `vso.profile`
1. Click **Save Configuration and Continue** to finish registering your Microsoft Entra App and continue to connect your Azure DevOps organizations.

### Connect Azure DevOps organizations{% #connect-azure-devops-organizations %}

After you have registered your Microsoft Entra App, you can connect any number of Azure DevOps organizations to Datadog as long as they are connected to the same Microsoft Entra tenant you used to register the app earlier.

1. Under **Add Service Principal**, enter the URL of your Azure DevOps organization in the **Organization URL** field.
1. Follow the link to the **Organization Settings** page in the Azure portal to invite users to your organization.
1. Click **Add users**, and select the Service Principal belonging to the Microsoft Entra App you registered earlier. This Service Principal must be invited with the following:
   - Access level: Basic
   - Add to projects: Select your relevant projects
   - Azure DevOps Groups: Project Contributors or an equivalent custom group with the following permissions:
     - Contribute
     - Contribute to pull requests
     - Create branch
     - Read
1. Under **Setup Service Hooks**, execute the provided PowerShell or Python script to create the necessary service hooks on all the projects in your Azure DevOps organization.
1. Select a Datadog API Key to use for the service hooks. You may choose an existing API Key or create a new one.
1. You must have an Azure DevOps Personal Access Token (PAT) with the **Code Read** and **Build Read** scopes to create service hooks on your organization's projects.
   - Add the PAT, along with the Datadog API Key, to your environment variables and execute the [service hooks script](https://github.com/DataDog/azdevops-sci-hooks) in your own terminal.
1. Click **Add Organization** to finish connecting your Azure DevOps organization.

After setup, you're returned to your original location in Datadog. To enable inline code snippets in APM, [set up Source Code Integration](https://docs.datadoghq.com/integrations/guide/source-code-integration/).

## Data Collected{% #data-collected %}

### Metrics{% #metrics %}

Azure DevOps Source Code does not include any metrics.

### Events{% #events %}

Azure DevOps Source Code does not include any events.

## Troubleshooting{% #troubleshooting %}

Need help? Contact [Datadog support](https://docs.datadoghq.com/help/).
