shan_chandra
Databricks Employee
Databricks Employee

Hi @arkadiuszr  -  can you please try the following steps and let us know?

To resolve this error, first you want to add your service principal to the workspace:

  1. Go to admin console as a workspace admin
  2. Select “service principal tab”
  3. Click “Add service principal button”
  4. Select the account service principals in the dropdown and add them into this workspace.

then bind your user to the service principal:

  • You must have the `can_bind` permission on a service principal.
  • If you are a workspace admin you will already have this permission.

To grant this permission to users, the workflow is as follows:

  1. As a workspace admin, goto the Admin Console.
  2. Get or create a PAT token.
  3. Get or create a service principal in the workspace.
  4. Get the id of the service principal, this should look like a GUID and not the descriptive name.
  5. Grant permission for your user to bind to that service principal.
$ vim grant-service-principal.json
{
"access_control_list": [
{
"user_name": "{username}",
"permission_level": "CAN_BIND"
}
]
}
$ curl -X PATCH {DATABRICKS_HOST}/api/2.0/permissions/service-principals/{SP_ID}
header "Content-type: application/json" header "Authorization: Bearer
${DATABRICKS_TOKEN}" data @grant-service-principal.json

Reference on Service Principal: https://docs.databricks.com/administration-guide/users-groups/service-principals.html#what-is-a-serv...

View solution in original post