Share via


Authorize a Microsoft Entra service principal to access Git folders

Use Microsoft Entra ID to authenticate access to Azure Databricks Git folders from your Azure DevOps automation. This page explains how to configure an Azure Databricks service principal with Microsoft Entra for authorization.

Requirements

Before you begin, verify that you have the following:

  • Workspace admin privileges in your Azure Databricks account
  • Service principal user privileges in your Azure Databricks account
  • A Microsoft Entra application ID for your Azure DevOps application, and permissions to modify its credentials.

If you don't have a Microsoft Entra application ID, see Authenticate to Azure DevOps with Microsoft Entra and Register an application in Microsoft Entra ID.

Configure a Microsoft Entra service principal

After you meet the requirements, configure your service principal in Azure Databricks and set up the federated credentials in Microsoft Entra ID.

  1. As a workspace admin, log in to the Azure Databricks workspace.

  2. Click your username in the top bar and select Settings.

  3. Click the Identity and access tab.

  4. Next to Service principals, click Manage.

  5. Click Add service principal or select an existing service principal to reconfigure. If you select an existing service principal, skip the next step.

  6. To create a new Microsoft Entra ID managed service principal:

    1. Select the Microsoft Entra ID managed radio button.
    2. Enter your Microsoft Entra ID application ID in the Microsoft Entra application ID field.
    3. Enter a name in the Service principal name field.
    4. Select the entitlements that your Azure DevOps automation requires, including Workspace access.
    5. If your service principal runs Lakeflow Jobs that access artifacts from Git folders, select Unrestricted cluster creation.
    6. Click Add. Your new service principal appears in the Service principals list.
  7. In the Service principals list, find and select your Microsoft Entra ID service principal.

  8. Click the Git integration tab and select Add Git credential.

  9. From the Git provider menu, select Azure DevOps Services (Microsoft Entra ID).

  10. Copy the federated credential information. You use this information in the next step.

    Important

    Don't select I've done the steps above or click Save yet.

  11. In a new browser window or tab, open the Microsoft Entra ID portal for your Azure subscription.

  12. Find your Azure application.

  13. Select Manage > Certificates & secrets.

  14. Click the Federated credentials tab.

  15. Click Add credential.

    The Certificates and secrets pane in the Microsoft Entra portal

  16. In the Microsoft Entra ID portal, use the federated credential information you copied from Azure Databricks to populate the Issuer, Type, and Value fields under Connect your account.

    The service principal details pane for Git integration. Copy the details from the grey callout box.

  17. Return to the Azure Databricks browser window with your service principal Git integration configuration.

  18. Select I've done the steps above.

  19. Click Save.

Your service principal is now configured to access Azure Databricks Git folders through Azure DevOps. When you share this service principal, grant Service Principal User access to any workspace users who need it. This includes users who run Git jobs or use automation code that accesses the Repos API.

Troubleshooting

If you encounter issues with your service principal configuration, check the following common problems.

Service principal access level in Azure DevOps

Your service principal must have an access level of Basic or higher in the Azure DevOps organization of the target repository. To configure this:

  1. In your Azure DevOps subscription, go to Organization Settings > Users > Add Users.
  2. Copy and paste your service principal's application (client) ID into the Users or Service Principals search box.
  3. Select your service principal account.

For more information, see Change access levels in the Azure DevOps documentation.

Service principal permissions

Your service principal must be added to your Azure workspace. Other users on your Azure account must have permissions to use it. See Service principals.

Next steps