Based on your error, you are using Managed Identity to access Key Vault. You need to make sure that the managed identity has been granted access to the Key Vault using either the access policies, or if you have updated your Key Vault to use Azure RBAC, the RBAC permissions.
not able to access key vault
Why I am not able to read the keyvault through the .net application though
through Azure CLI command or powershell able to access the keyvault secret ?
2 answers
Sort by: Most helpful
-
-
JamesTran-MSFT 36,776 Reputation points Microsoft Employee
2021-08-10T18:42:48.16+00:00 @Rakesh Yadav
Thank you for your post and I apologize for the delayed response!Based off your error message - "ManagedIdentityCredential authentication failed: Retry failed after 4 tries", I was able to find a similar issue on Stack Overflow that might help with troubleshooting this. If you're trying to use ManagedIdentityCredential on your local machine, this isn't supported.
For more details:
When using DefaultAzureCredential, web app tries to use ManagedIdentityCredential on local computer
Local development authentication
AppAuthentication to Azure.Identity Migration Guidance
DefaultAzureCredential.csIf you have any other questions, please let me know.
Thank you for your time and patience throughout this issue.----------
Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.