'Databricks Repo with Azure DevOps - 400 Bad Request when trying to add repo

when trying to use the databricks Repo feature with AzureDevOps, I am not able to add a repo to my databricks workspace add repo and I am getting a Bad Request as Response error message. Under User settings -> Git Integration -> Git Provider I have selected Azure Devops Services and in advanced settings Notebook Git Versioning is enabled.

I tried with a different browser, aswell as in private mode. In addition I tried to delete my cookies, but still got the same error. The integration to GitHub with a PAT works fine. I am also able to sync notebooks to the Azure DevOps repository, but the repo feature itself is not working.

I work in a corporate environment and we use single sign on with Azure Active Directory to authenticate to the Workspace. I really dont have an idea what causes the issue. My only guess is that something AD authentification related is not set properly. Sometimes when trying to access the workspace via the azure portal I receive the message that my account has no Contributer or Owner Role on the workspace role warning, which is strange since I am an admin in the Databricks workspace. After clicking on sign in with AzureAD I receive the warning: AADSTS90015: Requested query string is too long query string warning. However if I click back in the browser and click again on sign in with AzureID I am able to access the workspace.



Solution 1:[1]

The 400 Bad Request is an error from Azure DevOps. We would recommend you reach out to Azure DevOps support for help on this.

Regarding the role warning, this is related to your permissions on the workspace object in Azure Active Directory (rather than your admin permissions in the workspace) - the error message indicates that when we looked up your permissions in Azure, they didn't match those of either a contributor or owner on the workspace. However, if you are a contributor and see this error occasionally, that is unexpected behavior and we can surface this internally.

Solution 2:[2]

Check if your account that signed in Databricks has the correct permissions in the workspace on Azure Portal, and on Azure DevOps to access the Git repository.

You also can try to use the same account to sign in Azure DevOps to see if you can access the specified repository.

For more details, you can see "Azure Databricks - Repos for Git integration".

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 user13015326
Solution 2