I am trying to create the secrete scope which is backend by azure key vault so when I tried with secret api, I got an error has
Input:
response = requests.post(
'https://%s/api/2.0/secrets/scopes/create' % (DOMAIN),
headers={'Authorization': 'Bearer %s' % TOKEN,},
json={"scope": "my-simple-azure-keyvault-scope",
"scope_backend_type": "AZURE_KEYVAULT",
"backend_azure_keyvault":
{
"resource_id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/azure-rg/providers/Microsoft.KeyVault/vaults/my-azure-kv",
"dns_name": "https://my-azure-kv.vault.azure.net/"
},
"initial_manage_principal": "users"
})
Output:
{
"error_code": "INVALID_PARAMETER_VALUE",
"message": "Scope with Azure KeyVault must have userAADToken defined!"
}
I tried with Different method which is Databricks Cli for that I faced a error, So I created a Secret scope using databricks UI and tried to access through cli
Input:
databricks configure --token
Databricks Host (should begin with https://): https://adb-...azuredatabricks.net/
Token:
D:\Users\>databricks secrets list-scopes
Output:
Error: b'Bad Request'
In Cmd prompt
Is there a way to get AAD token, I have implemented Microsoft documents for getting token but didn't work