How to grant permission to the keyvault to fetch secrets.

Delfina Iriarte 0 Reputation points
2024-04-23T12:47:33.7+00:00

I am trying to change the connection to the DB by using the keyvault -instead of hardcoding everything. I've seen then you can retrieve all of the "secrets" by generating your client (with the key vault) and then simply call the client.get_secret('secretName'). However, I don't have enough permission to retrieve that information.

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

2 answers

Sort by: Most helpful
  1. Marcin Policht 11,230 Reputation points MVP
    2024-04-23T12:58:04.6833333+00:00

    Follow https://learn.microsoft.com/en-us/azure/key-vault/general/rbac-guide?tabs=azure-cli and


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin


  2. Givary-MSFT 28,321 Reputation points Microsoft Employee
    2024-04-30T02:43:38.4933333+00:00

    @Delfina Iriarte Apologies for the delayed response, request you to review this - https://github.com/MicrosoftDocs/azure-docs/issues/93812 see if it helps and feel free to post back.

    0 comments No comments