Courseiva
Implement and Manage StoragemediumMultiple ChoiceObjective-mapped

AZ-104 Implement and Manage Storage Practice Question

A finance department shares a resource group containing a critical VM and a storage account. Administrators must still be able to update settings and apply patches, but no one should accidentally delete the resources. Which lock should be applied at the resource group level?

⚠ Common exam trap

Watch out — candidates often confuse ReadOnly locks with the most restrictive option and assume it is the best choice, without considering that it blocks all write operations, including necessary updates and patching.

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

CanNotDelete lock.

The CanNotDelete lock (option B) is correct because it prevents users from deleting the resource group or its resources, while still allowing read and update operations. This meets the requirement that administrators can update settings and apply patches, but accidental deletion is blocked. ReadOnly locks would block all write operations, including patching, which is too restrictive for this scenario.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ReadOnly lock, because it is the most restrictive option.

    Why it's wrong here

    ReadOnly is the most restrictive lock, but it blocks all write operations, including VM start/stop, extension updates, patching, and storage account key regeneration, which are routine management actions a finance department must continue to perform. The business need is only to prevent deletion, so CanNotDelete provides exactly that protection without freezing normal operations; ReadOnly would create operational downtime for a problem that does not exist.

    When this WOULD be correct

    A ReadOnly lock would be correct if the requirement were to prevent any changes to resources, including configuration updates, while still allowing read access. For example, a compliance scenario where a resource's configuration must remain immutable for auditing purposes.

  • CanNotDelete lock.

    Why this is correct

    CanNotDelete is the appropriate lock when administrators must continue making changes but want to prevent accidental deletion. Applied at the resource group level, it protects the VM and storage account from removal while allowing normal management operations to continue.

  • A policy assignment that denies delete operations.

    Why it's wrong here

    An Azure Policy that denies delete operations can help enforce compliance, but it applies to ARM requests across the subscription or management group and requires careful scoping, exemptions, and exemption of system-assigned identities; it can also interfere with legitimate deletion workflows or be bypassed if the policy is not assigned to the exact scope. A resource lock is the purpose-built, easier-to-manage safeguard against accidental deletion, and it cannot be overridden by a user without explicit unlock permissions, making it the correct choice.

    When this WOULD be correct

    If the question required preventing deletion of specific resource types (e.g., only VMs) while allowing deletion of others, or if the organization needed to enforce additional compliance rules beyond simple deletion prevention, a custom policy assignment would be the correct answer.

  • No lock, because RBAC permissions already prevent deletion.

    Why it's wrong here

    RBAC permissions only govern which identities are allowed to perform a delete; if a user holds Contributor or Owner on the resource group, RBAC will not block an accidental delete. A CanNotDelete lock is an independent, higher-priority control that prevents deletion even for users with built-in delete permissions, so relying solely on RBAC leaves a gap where a privileged user's mistake can destroy the VM and storage account.

    When this WOULD be correct

    If the question stated that all users have only Reader role and no one has delete permissions, then no lock would be needed because RBAC already prevents deletion.

Option-by-option analysis

Why each answer is right or wrong

Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The AZ-104 exam frequently reuses these exact scenarios with slightly different constraints.

CanNotDelete lock.Correct answer

Why this is correct

CanNotDelete is the appropriate lock when administrators must continue making changes but want to prevent accidental deletion. Applied at the resource group level, it protects the VM and storage account from removal while allowing normal management operations to continue.

ReadOnly lock, because it is the most restrictive option.Wrong answer — click to see why

Why this is wrong here

A ReadOnly lock prevents all write operations, including updates and patching, which contradicts the requirement that administrators must still be able to update settings and apply patches.

★ When this WOULD be the correct answer

A ReadOnly lock would be correct if the requirement were to prevent any changes to resources, including configuration updates, while still allowing read access. For example, a compliance scenario where a resource's configuration must remain immutable for auditing purposes.

Why candidates choose this

Candidates may choose ReadOnly because it is the most restrictive lock type, assuming that more restriction is better for preventing accidental deletion, without considering that it also blocks necessary administrative updates.

A policy assignment that denies delete operations.Wrong answer — click to see why

Why this is wrong here

A policy assignment denies delete operations but does not prevent modification of settings or patching; however, the question specifically asks for a lock, not a policy. Locks are simpler and apply uniformly, while policies require explicit definition and can be overridden by RBAC if not properly configured.

★ When this WOULD be the correct answer

If the question required preventing deletion of specific resource types (e.g., only VMs) while allowing deletion of others, or if the organization needed to enforce additional compliance rules beyond simple deletion prevention, a custom policy assignment would be the correct answer.

Why candidates choose this

Candidates may confuse Azure Policy with resource locks, thinking policies can achieve the same result, or they may over-engineer the solution by choosing a more complex option when a simpler one suffices.

No lock, because RBAC permissions already prevent deletion.Wrong answer — click to see why

Why this is wrong here

RBAC permissions alone do not prevent accidental deletion; users with Contributor or Owner roles can delete resources. A lock is needed to enforce deletion protection beyond RBAC.

★ When this WOULD be the correct answer

If the question stated that all users have only Reader role and no one has delete permissions, then no lock would be needed because RBAC already prevents deletion.

Why candidates choose this

Candidates may overestimate RBAC's ability to prevent deletion, assuming that proper role assignments eliminate the need for locks, especially when 'least privilege' is emphasized.

Analysis generated from the official AZ-104blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”

About these practice questions

Courseiva writes every AZ-104 question from scratch — 1,049 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-104 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-104 exam.