0

I have python script which runs on HDI spark cluster, and it access key vault to read secret values. The code would create SecretClient and use managed identity as credential. I have a user assigned managed identity set on HDI. But the SecretClient creation fails giving error that "No managed identity assigned to this resource. I also tried to set the client id of managed identity explicitly in the credential, but then it threw exception that "Provided managed identity is not assigned to this resource".

File "/usr/bin/anaconda/envs/py37test/lib/python3.7/site-packages/azure/identity/_credentials/managed_identity.py", line 224, in _refresh_token
    six.raise_from(CredentialUnavailableError(message=message), ex)
  File "<string>", line 3, in raise_from
azure.identity._exceptions.CredentialUnavailableError: 
ManagedIdentityCredential authentication unavailable. No identity has been assigned to this resource.
Ecstasy
  • 1,866
  • 1
  • 9
  • 17
mav3rick
  • 31
  • 3
  • Does this answer your question? [Azure KeyVault: Azure.Identity.CredentialUnavailableException: DefaultAzureCredential failed to retrieve a token from the included credentials](https://stackoverflow.com/questions/62817337/azure-keyvault-azure-identity-credentialunavailableexception-defaultazurecrede) – Ecstasy Jun 20 '22 at 07:04
  • [ManagedIdentityCredential authentication unavailable,no managed identity endpoint found-1](https://stackoverflow.com/questions/67367181/managedidentitycredential-authentication-unavailable-no-managed-identity-endpoi), [ManagedIdentityCredential authentication unavailable,no managed identity endpoint found-2](https://docs.microsoft.com/en-us/answers/questions/380576/managedidentitycredential-authentication-unavailab.html) and [DefaultAzureCredential failed to retrieve token](https://techcommunity.microsoft.com/t5/iis-support-blog/defaultazurecredential-failed-to-retrieve-a-token/ba-p/3038734) – Ecstasy Jun 20 '22 at 07:05

0 Answers0