not able to access key vault

Rakesh Yadav 1 Reputation point
2021-08-03T08:23:09.137+00:00

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 ?

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,194 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sam Cogan 10,347 Reputation points MVP
    2021-08-03T09:26:06.573+00:00

    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.


  2. JamesTran-MSFT 36,541 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.cs

    If 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.

    0 comments No comments