If you’re working with a large multi-tenancy organisation it’s possible the subscription your Databricks resource sits in is a different tenancy to the Azure DevOps hosting your repositories. This blog explains how to connect Databricks to a DevOps repository in that scenario.
When trying to connect to DevOps in a seperate tenancy, you’ll receive the message Unable to parse credentials from Azure Active Directory account. Ensure Azure Devops account is connected to AAD.
if you haven’t configured a Personal Access Token (PAT).
-
Go to dev.azure.com and login to the DevOps organisation containing the repository you’re trying to connect Databricks to.
-
Click the User Settings icon in the top right and go to Personal Access Tokens.
-
Click + New Token
-
Fill in the Create a new personal access token form:
- Give the token a sensible name, such as ‘Databricks Repo Token’
- Select the appropriate organisation
- Set the expiration as required
- The scope required ‘Full access’
- Press Create
-
Copy the access token displayed.
-
Go to your Databricks workspace.
-
Click the workspace name in the top right and choose User Settings
-
Go to the Git Intergration tab at the top of the page.
-
Change the drop down to Azure DevOps Services (personal access token)
-
Populate the Git provider username or email address with the email address you use to log in to the DevOps organisation.
-
Paste the token copied in step 5 into the Token box and press save.
With that configured, you can now go back to Repos, select Add Repo, and clone the remote Git repo.