AZ-204 Implement Azure security Practice Question
You have an Azure App Service web app that uses a system-assigned managed identity. The app needs to read a secret stored in Azure Key Vault. You need to grant the app the minimum required permissions to access the secret. Which RBAC role should you assign to the managed identity at the Key Vault scope?
⚠ Common exam trap
Watch out — candidates often confuse the Key Vault Reader role (which only allows listing vaults and reading metadata, not secret values) with the ability to read secrets, leading them to select it as the minimum permission.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Key Vault Secrets User
The Key Vault Secrets User role grants the minimum required permission to read secrets from Azure Key Vault. This role provides the 'Microsoft.KeyVault/vaults/secrets/getSecret/action' permission, which is exactly what the app needs to retrieve the secret value. It does not grant any write or management capabilities, adhering to the principle of least privilege.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Key Vault Reader
Why it's wrong here
This role grants permissions like Microsoft.KeyVault/vaults/read, allowing an identity to view the Key Vault resource properties and configuration settings, such as its SKU, access policies, and network firewall rules. However, it explicitly does not provide data plane access to read the actual secret values stored within the vault. Therefore, an App Service assigned this role cannot retrieve secrets for application use.
- ✓
Key Vault Secrets User
Why this is correct
The Key Vault Secrets User role provides specific data plane permissions, including Microsoft.KeyVault/vaults/secrets/read (which encompasses get and list operations), allowing an identity to retrieve the actual secret values stored within an Azure Key Vault. This role adheres to the principle of least privilege by granting only the necessary access to read secrets, without permitting their creation, deletion, or modification, making it ideal for an App Service needing to consume secrets.
- ✗
Key Vault Secrets Officer
Why it's wrong here
The Key Vault Secrets Officer role grants comprehensive data plane permissions over secrets, including Microsoft.KeyVault/vaults/secrets/*, which allows an identity to create, delete, update, and manage all aspects of secrets within the vault, in addition to reading them. While it includes read access, assigning this role to an App Service that only needs to retrieve secrets violates the principle of least privilege by granting excessive permissions beyond what is required for its operational function.
- ✗
Contributor
Why it's wrong here
The Contributor role provides broad management plane access to an Azure Key Vault resource, enabling an identity to manage the vault itself, such as configuring its properties, network settings, or access policies. However, this role does not inherently grant data plane access to the secrets, keys, or certificates stored inside the vault. To read secret values, explicit data plane permissions, typically through an Azure RBAC role like Key Vault Secrets User, are required.
Quick reference
Access Control Model Comparison
| Model | Acronym | Who Controls Access? | Best For |
|---|---|---|---|
| Discretionary Access Control | DAC | Resource owner | Small teams, file shares |
| Mandatory Access Control | MAC | System / security labels | Classified govt / military |
| Role-Based Access Control | RBAC | Administrator (via roles) | Enterprise environments |
| Attribute-Based Access Control | ABAC | Policy engine (user + resource attributes) | Fine-grained, dynamic policies |
| Rule-Based Access Control | RuBAC | System rules / ACLs | Firewall rules, network ACLs |
Go deeper
Related to this question
Learn chapter
Azure Functions Development
Key term
Key Vault Secrets
Key Vault Secrets are secure containers in Microsoft Azure that store sensitive information like passwords, connection strings, and API keys, keeping them encrypted and accessible only to authorized applications and users.
Key term
Managed identity
A managed identity is an automatically managed service principal in Azure that allows your code to authenticate to any service that supports Azure AD authentication without storing credentials.
About these practice questions
Courseiva writes every AZ-204 question from scratch — 881 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-204 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-204 exam.