Writing a python app that needs access to key vault secret

Stef AP 0 Reputation points
2023-10-11T12:31:35.53+00:00

Hi all,

  • I have a keyvault with some secrets. The keyvault access config is set to RBAC
  • I have created an App registration in Entra for the app i am making
  • I would like to give this app access to the key vault

But:

  • I think i need to add a role, using "Key vault reader", but i don't know how to link this role to the App i have registered above.
  • I also see "Access policies" as an option , but that is not available, als RBAC is the preferred method.

Any help much appreciated!

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

1 answer

Sort by: Most helpful
  1. Akshay-MSFT 17,931 Reputation points Microsoft Employee
    2023-10-12T06:28:04.32+00:00

    @Stef AP

    Thank you for posting your query on Microsoft Q&A, from above description I could understand that you want to give your Entra ID (Azure AD) registered application access to Azure Key Vault via RBAC role.

    Please do correct me if this is not the case by responding in the comments section.

    Kindly follow the given steps:

    • Copy Registered application name from the registered application overview.

    User's image

    • Navigate to KeyVaults > Access control (IAM) > Add > Add Role Assignment > Select "Key Vault Reader" > Look for Application with display name under "Select members" and application would be available for service principal.

    User's image

    • Once visible click on the app name for selection > Review+Assign.
    • To validate, click on "check access" on the Key Vault.

    User's image

    • Search for application with display name and select it to see the assigned role.

    User's image

    Thanks,

    Akshay Kaushik

    Please "Accept the answer" (Yes), and share your feedback if the suggestion answers you’re your query. This will help us and others in the community as well.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.