not able to access key vault

Rakesh Yadav 1 Reputation point

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,151 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sam Cogan 10,322 Reputation points MVP

    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,481 Reputation points Microsoft Employee

    @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

    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