Hi all, im working with Azure DevOps and Databricks, using an app registration which it has permission on AzureDevOps and inside databricks as manager,user and in the group admins so it has permission over the repos.
Im doing a pipeline to update or create a Repo and its not working
- bash: |
URL="$(DATABRICKS-HOST)/api/2.0/repos/{REPO_ID}"
JSON_PAYLOAD='{
"branch": "{BRANCH}",
"sparse_checkout": {
"patterns": [
"parent-folder/child-folder"
]
}
}'
curl -v --location --request PATCH "$URL" \
--header "Authorization: Bearer $DATABRICKS_TOKEN" \
--header "Content-Type: application/json" \
--header "X-Databricks-Azure-SP-Management-Token: $ENTRAID_TOKEN" \
--header "X-Databricks-Org-Id: {ORG_ID}" \
--header "X-Databricks-Azure-Workspace-Resource-Id: /subscriptions/{SUBID}/resourceGroups/{RG}/providers/Microsoft.Databricks/workspaces/{DATABRICKS-NAME}" \
--data "$JSON_PAYLOAD"
I have created 3 tokens, PAT token, databricks token and EntraID token for this. Im using Data token to interact with databricks API.
Also before this step, i generate a git credential and then update the credential, get the repo id and try to update
{"error_code":"BAD_REQUEST","message":"Remote repo not found. Please ensure that:\n1. Your remote Git repo URL is valid.\n2. Your personal access token or app password has the correct repo access."}
2024-12-17T19:39:25.1346177Z
It gives me back crendetials, repos, repo permission, etc.