Hi @keer1392, The error you are encountering is due to the Azure Databricks application not having the appropriate permissions to access the secrets in the Azure Key Vault.
The error message indicates that the Azure Databricks application is not authorized to perform the ’Microsoft.KeyVault/vaults/secrets/getSecret/action’ on the KeyVault.
To resolve this issue, you must grant the Azure Databricks application the necessary permissions on the Azure Key Vault. Specifically, you need to add an access policy in the Key Vault for the Azure Databricks application and grant it the ’Get’ and ’List’ permissions under ’Secret permissions’.
Unfortunately, I cannot provide the exact commands to perform these actions as they are typically done via the Azure portal or Azure CLI, not within Databricks.
When using the mount commands, remember to replace the placeholders with your actual values. For example, replace <container-name>
with the name of your container, <storage-account-name>
with the name of your storage account and <mount-name>
with the name of your mount point.
Here is an example of how you might mount your storage:
python
configs = {
"fs.azure.account.auth.type": "CustomAccessToken",
"fs.azure.account.custom.token.provider.class": spark.conf.get("spark.databricks.passthrough.adls.gen2.tokenProviderClassName")
}
dbutils.fs.mount(
source = "abfss://<container-name>@<storage-account-name>.dfs.core.windows.net/",
mount_point = "/mnt/<mount-name>",
extra_configs = configs)
Please note that you must replace <container-name>
, <storage-account-name>
, and <mount-name>
with your actual values.