AZ-204 Implement Azure security Practice Question
Network Topology
Refer to the exhibit. You run the Azure CLI command shown. What is the result?
⚠ Common exam trap
Candidates often confuse the verbs for different Key Vault operations (e.g., 'secret set' vs. 'key create' or 'certificate create'), leading them to misinterpret the command's purpose.
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
✓
Stores a secret named MySecret with the value in the vault
The Azure CLI command `az keyvault secret set --vault-name MyVault --name MySecret --value 'MySecretValue'` is used to create or update a secret in an Azure Key Vault. The `--name` parameter specifies the secret's name, and `--value` provides the secret's value. Since the secret does not exist, it creates a new secret named MySecret with the specified value, making option C correct.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Creates a key named MySecret in the vault
Why it's wrong here
The command writes a secret, not a cryptographic key, so no key is created. Keys are created with 'az keyvault key create'; this option tempts because keys, secrets and certificates all reside in a vault, but the secret set operation stores a secret value instead.
- ✗
Deletes the secret named MySecret from the vault
Why it's wrong here
The command in the exhibit creates or imports a secret rather than deleting one, so no removal occurs. Secret deletion requires 'az keyvault secret delete', which is the correct operation when retiring a credential; this option confuses the write operation shown with that separate delete command.
- ✓
Stores a secret named MySecret with the value in the vault
Why this is correct
The az keyvault secret set command writes a new secret into the specified vault, creating the secret named MySecret with the supplied value. It performs a write to the vault's secret store rather than retrieving or deleting anything.
- ✗
Creates a certificate named MySecret in the vault
Why it's wrong here
The command targets a secret, not a certificate, so no certificate is created. Certificates are managed via 'az keyvault certificate' commands; this option is tempting because certificates and secrets share vault storage, but the secret set operation writes secret material only.
Go deeper
Related to this question
Learn chapter
Key Vault References in App Service and Functions
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.
About these practice questions
One of 883 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 →
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.