I am trying to create a keyvault backed scope in databricks. I am able to successfully create the scope but when I try to add a key to the scope I see the following error:
Error: b'{"error_code":"BAD_REQUEST","message":"Cannot write secrets to Azure KeyVault-backed scope abc"}'
These are steps I have followed and all commands were run on windows cmd:
- Create key vault in Azure
- Generate AAD token for databricks -
az account get-access-token --resource 2ff814a6-3304-4ab8-85cb-cd0e6f879c1d
- Add AAD token to environment variables on windows
- Add AAD token to databricks cfg file on windows -
databricks configure --aad-token
- Create scope -
databricks secrets create-scope --scope abc --scope-backend-type AZURE_KEYVAULT --resource-id <keyvault-id> --dns-name <keyvault-dns> --initial-manage-principal users
- Add key to scope -
databricks secrets put --scope abc --key abc-key
<< this where I see the error