Drag steps to the numbered slots on the right, or tap a step then tap a slot.
AZ-204 Implement Azure security Practice Question
Arrange the steps to implement Azure Key Vault for storing and retrieving secrets in an application in the correct order.
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
Create Key Vault, then Add a secret, then Grant access to the secret, then Retrieve the secret, then Use the secret
The correct sequence for implementing Azure Key Vault is: first create the Key Vault, then add the secret, grant access to the secret (e.g., via access policies or RBAC), retrieve the secret in the application, and finally use it. This ensures proper resource creation and security before accessing sensitive data.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Create Key Vault, then Add a secret, then Grant access to the secret, then Retrieve the secret, then Use the secret
Why this is correct
This sequence correctly outlines the logical and technical dependencies for secure secret management within Azure. First, the Azure Key Vault resource must be provisioned. Next, the specific secret (e.g., database connection string, API key) is securely stored within the vault. Subsequently, an identity (user, application, or Managed Identity) is granted appropriate access policies (e.g., 'Get', 'List') to the secret. Only then can the application programmatically retrieve the secret, typically at runtime, for its intended operational use.
- ✗
Create Key Vault, then Grant access to the secret, then Add a secret, then Retrieve the secret, then Use the secret
Why it's wrong here
This order is incorrect because you cannot grant access to a secret that has not yet been created or stored within the Key Vault. Access policies are defined for specific vault objects like secrets, keys, or certificates. Attempting to assign permissions to a non-existent secret would either fail or be ineffective, as the target resource for the access policy is missing. The secret must exist before permissions can be meaningfully applied to it.
- ✗
Create Key Vault, then Add a secret, then Retrieve the secret, then Grant access to the secret, then Use the secret
Why it's wrong here
This sequence is fundamentally flawed because an application or user cannot retrieve a secret from Azure Key Vault without having the necessary permissions explicitly granted beforehand. Azure Key Vault enforces a robust access control model, requiring an identity to possess at least the 'Get' secret permission. Attempting retrieval before access is granted would result in an authorization failure, preventing the secret from being accessed and subsequently used by the application.
- ✗
Add a secret, then Create Key Vault, then Grant access to the secret, then Retrieve the secret, then Use the secret
Why it's wrong here
This order is incorrect because a secret must reside within an Azure Key Vault instance; it cannot exist independently or be added to a non-existent container. The Key Vault itself is the secure, managed service that provides the storage, encryption, and lifecycle management for secrets. Therefore, the Key Vault resource must be provisioned and available in Azure before any secrets can be uploaded or stored within it.
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
About these practice questions
One of 881 original AZ-204 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
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.