Skip to main content

Set up Azure DevOps

Available for dbt Cloud Enterprise

Connecting an Azure DevOps cloud account is available for organizations using the dbt Cloud Enterprise tier.

dbt Cloud's native Azure DevOps integration does not support Azure DevOps Server (on-premise). Instead, you can import a project by git URL to connect to an Azure DevOps Server.

Overview

To use our native integration with Azure DevOps in dbt Cloud, an account admin needs to set up an Microsoft Entra ID app. We recommend setting up a separate Entra ID application than used for SSO.

  1. Register an Entra ID app.
  2. Add permissions to your new app.
  3. Add another redirect URI.
  4. Connect Azure DevOps to your new app.
  5. Add your Entra ID app to dbt Cloud.

Once the Microsoft Entra ID app is added to dbt Cloud, an account admin must also connect a service principal, which will be used to power headless actions in dbt Cloud such as deployment runs and CI.

Once the Microsoft Entra ID app is added to dbt Cloud and the service principal is connected, then dbt Cloud developers can personally authenticate in dbt Cloud from Azure DevOps. For more on this, see Authenticate with Azure DevOps.

The following personas are required to complete the steps on this page:

  • Microsoft Entra ID admin
  • Azure DevOps admin
  • dbt Cloud account admin
  • Azure admin (if your Entra ID and Azure DevOps environments are not connected)

Register a Microsoft Entra ID app

A Microsoft Entra ID admin needs to perform the following steps:

  1. Sign into your Azure portal and click Microsoft Entra ID.
  2. Select App registrations in the left panel.
  3. Select New registration. The form for creating a new Entra ID app opens.
  4. Provide a name for your app. We recommend using, "dbt Labs Azure DevOps app".
  5. Select Accounts in any organizational directory (Any Entra ID directory - Multitenant) as the Supported Account Types. Many customers ask why they need to select Multitenant instead of Single tenant, and they frequently get this step wrong. Microsoft considers Azure DevOps (formerly called Visual Studio) and Microsoft Entra ID as separate tenants, and in order for this Entra ID application to work properly, you must select Multitenant.
  6. Add a redirect URI by selecting Web and, in the field, entering https://YOUR_ACCESS_URL/complete/azure_active_directory, replacing YOUR_ACCESS_URL with the appropriate Access URL for your region and plan.
  7. Click Register.
Navigating to the Entra ID app registrationsNavigating to the Entra ID app registrations

Here's what your app should look like before registering it:

Registering a Microsoft Entra ID appRegistering a Microsoft Entra ID app

Add permissions to your new app

An Entra ID admin needs to provide your new app access to Azure DevOps:

  1. Select API permissions in the left navigation panel.
  2. Remove the Microsoft Graph / User Read permission.
  3. Click Add a permission.
  4. Select Azure DevOps.
  5. Select the user_impersonation permission. This is the only permission available for Azure DevOps.
Adding permissions to the appAdding permissions to the app

Add another redirect URI

A Microsoft Entra ID admin needs to add another redirect URI to your Entra ID application. This redirect URI will be used to authenticate the service principal for headless actions in deployment environments.

  1. Navigate to your Microsoft Entra ID application.

  2. Select the link next to Redirect URIs

  3. Click Add URI and add the URI, replacing YOUR_ACCESS_URL with the appropriate Access URL for your region and plan: https://YOUR_ACCESS_URL/complete/azure_active_directory_service_principal

  4. Click Save.

Create a client secret

A Microsoft Entra ID admin needs to complete the following steps:

  1. Navigate to Microsoft Entra ID, click App registrations, and click on your app.
  2. Select Certificates and Secrets from the left navigation panel.
  3. Select Client secrets and click New client secret
  4. Give the secret a description and select the expiration time. Click Add.
  5. Copy the Value field and securely share it with the dbt Cloud account admin who will complete the setup.

Connect Azure DevOps to your new app

An Azure admin will need one of the following permissions in both the Microsoft Entra ID and Azure DevOps environments:

  • Azure Service Administrator
  • Azure Co-administrator

If your Azure DevOps account is connected to Entra ID, then you can proceed to Connect a service principal. However, if you're just getting set up, connect Azure DevOps to the Microsoft Entra ID app you just created:

  1. From your Azure DevOps account, select Organization settings in the bottom left.
  2. Navigate to Microsoft Entra ID.
  3. Click Connect directory.
  4. Select the directory you want to connect.
  5. Click Connect.
Connecting Azure DevOps and Microsoft Entra IDConnecting Azure DevOps and Microsoft Entra ID

Configure the Entra ID connection

There are two connection methods currently available for dbt Cloud and Azure DevOps:

  • Service principal (recommended): Create an application connection via client ID and secret for unattended authentication.
  • Service user (legacy): Create a user that will authenticate the connection with username and password. This configuration should be avoided.

Create a service principal

The application's service principal represents the Entra ID application object. Whereas a service user represents a real user in Azure with an Entra ID (and an applicable license), the service principal is a secure identity used by an application to access Azure resources unattended. The service principal authenticates with a client ID and secret rather than a username and password (or any other form of user auth). Service principals are the Microsoft recommended method for authenticating apps.

Add a role to the Service Principal

You can create a new role or assign an existing one to the service principal app. It must have the following permissions:

  • Project Reader
  • ViewSubscriptions
  • EditSubscriptions
  • DeleteSubscriptions *
  • PullRequestContribute
  • GenericContribute

In your Azure account:

  1. Navigate to Subscriptions and click on the appropriate subscription name for the application environment.
  2. From the left-side menu of the subscription window, click Access control (IAM).
  3. From the top menu, click Add and select Add role assignment from the dropdown.
The 'Access control (IAM)' window in the 'Subscriptions' section of Azure.The 'Access control (IAM)' window in the 'Subscriptions' section of Azure.
  1. In the Role tab, select a role with appropriate permissions to assign the service principal.

  2. Click the Members tab. You must set Assign access to to User, group, or service principal.

  3. Click Select members and search for your app name in the window. Once it appears, click your app, which will appear in the Selected members section. Click Select at the bottom to save your selection.

    The dbt Cloud ADO app in the members section.The dbt Cloud ADO app in the members section.
  4. Confirm the details are correct and click Review + assign.

    Review screen with the app service principal and permissions.Review screen with the app service principal and permissions.

Navigate back to the App registrations screen and click the app. On the left menu, click Roles and administrators and you will see the app role assignment.

Migrate to service principal

If your dbt Cloud app does not have a service principal, take the following actions in your Azure account:

  1. Navigate to Microsoft Entra ID.

  2. Under Manage on the left-side menu, click App registrations.

  3. Click the app for the dbt Cloud and Azure DevOps integration.

  4. Locate the Managed application in local directory field and click Create Service Principal.

    Example of the 'Create Service Principal' option highlighted .Example of the 'Create Service Principal' option highlighted .
  5. Follow the instructions in Add role to service principal.

  6. In dbt Cloud, navigate to Account settings --> Integrations and edit the Azure DevOps integration.

Add your Microsoft Entra ID app to dbt Cloud

A dbt Cloud account admin must take the following actions.

Once you connect your Microsoft Entra ID app and Azure DevOps, you need to provide dbt Cloud information about the app:

  1. Navigate to your account settings in dbt Cloud.
  2. Select Integrations.
  3. Scroll to the Azure DevOps section.
  4. Complete the form:
    • Azure DevOps Organization: Must match the name of your Azure DevOps organization exactly. Do not include the dev.azure.com/ prefix in this field. ✅ Use my-devops-org ❌ Avoid dev.azure.com/my-devops-org
    • Application (client) ID: Found in the Microsoft Entra ID app.
    • Client Secrets: Copy the Value field in the Microsoft Entra ID app client secrets and paste it in the Client Secret field in dbt Cloud. Entra ID admins are responsible for the Entra ID app secret expiration and dbt Admins should note the expiration date for rotation.
    • Directory(tenant) ID: Found in the Microsoft Entra ID app.
      Fields for adding Entra ID app to dbt Cloud.Fields for adding Entra ID app to dbt Cloud.

Your Microsoft Entra ID app should now be added to your dbt Cloud Account. People on your team who want to develop in the dbt Cloud IDE or dbt Cloud CLI can now personally authorize Azure DevOps from their profiles.

0