azureazure-databricksazure-keyvaultazure-data-lake-gen2

PERMISSION_DENIED: Invalid permissions on the specified KeyVault


com.databricks.common.client.DatabricksServiceHttpClientException:
PERMISSION_DENIED: Invalid permissions on the specified KeyVault https://azkv*.vault.azure.net/.
Wrapped Message:
  Status code 403,
  {"error":
    {"code":"Forbidden","message":
       "Caller is not authorized to perform action on resource.\r\n
        If role assignments, deny assignments or role definitions were changed recently, please observe propagation time.\r\n
        Caller: name=AzureDatabricks;appid=xxxxxxxxxxxxxxxxxxxxxx;oid=xxxxxxxxxxxxxx;iss=https://sts.windows.net/xxxxxxxxxxxxxxxxxxx9945/\r\n
        Action: 'Microsoft.KeyVault/vaults/secrets/getSecret/action'\r\n
        Resource: '/subscriptions/6b60a61d-3e92-4501-8794-fd7725066113/resourcegroups/streamproject/providers/microsoft.keyvault/vaults/azkv*/secrets/clientsecret'\r\n
        Assignment: (not found)\r\n
        DecisionReason: 'DeniedWithNoValidRBAC' \r\n
        Vault: azkv*;location=eastus\r\n",
      "innererror":{"code":"ForbiddenByRbac"}
    }
  }

I have been trying to mount ADLS to databricks using service principal and secret scope. I can't access the key vault it seems.

How could I solve this?


Solution

  • You must add the identity in the access policy blade enter image description here

    then you set the required permissions for the secret scope enter image description here

    later select the corresponding service principal of your databrick enter image description here

    And then you create the policy enter image description here

    enter image description here

    Hope this helps!