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. Connect Azure DevOps to your new app.
  3. 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. Click Register.

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

Registering a Microsoft Entra ID appRegistering a Microsoft Entra ID app

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
note

You can only add a managed identity or service principal for the tenant to which your organization is connected. You need to add a directory to your organization so that it can access all the service principals and other identities. Navigate to Organization settings --> Microsoft Entra --> Connect Directory to connect.

  1. From your Azure DevOps account organization screen, click Organization settings in the bottom left.
  2. Under General settings, click Users.
  3. Click Add users, and in the resulting panel, enter the service principal's name in the first field. Then, click the name when it appears below the field.
  4. In the Add to projects field, click the boxes for any projects you want to include (or select all).
  5. Set the Azure DevOps Groups to Project Administrator.
Example setup with the service principal added as a user.Example setup with the service principal added as a user.

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

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 member’s section.The dbt Cloud ADO app in the member’s section.
  4. Confirm the correct details 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 if the app doesn't already have them assigned.

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

  7. Click the Service principal option, fill out the fields, and click Save. The services will continue to function uninterrupted.

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.
    • Redirect URI (Service users only): Copy this field to Redirect URIs field in your Entra ID app.

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