Question 382 of 1,170
Manage Azure Identities and GovernancemediumMultiple ChoiceObjective-mapped

CanNotDelete Lock — Prevent Accidental Deletion While Allowing Updates

This AZ-104 practice question tests your understanding of manage azure identities and governance. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

You need to prevent accidental deletion of a resource group while still allowing administrators to create and modify resources inside it. Which Azure lock should you apply?

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

The CanNotDelete lock prevents deletion of the resource group while still allowing all operations (read, write, modify) on resources within it. This lock type is designed specifically to protect against accidental deletion without restricting administrative actions like creating or updating resources.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

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

    Why it's wrong here

    A ReadOnly lock would prevent modifications as well as deletion.

    When this WOULD be correct

    A ReadOnly lock would be correct if the requirement was to prevent any changes to the resource group and its resources, such as protecting a production environment from accidental modifications while still allowing read access.

  • CanNotDelete

    Why this is correct

    A CanNotDelete lock prevents deletion while still permitting updates.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Delete lock

    Why it's wrong here

    Delete lock is not the Azure lock type name.

    When this WOULD be correct

    This option would be correct if the question asked about a custom lock name or a fictional scenario where a 'Delete lock' is defined as a custom role or policy. However, in standard Azure RBAC, no such lock exists.

  • No lock and a budget alert

    Why it's wrong here

    A budget alert does not prevent deletion.

    When this WOULD be correct

    When the question asks for a method to be notified if resource costs exceed a threshold, or to enforce cost limits without blocking administrative actions, a budget alert would be correct.

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.

CanNotDeleteCorrect answer

Why this is correct

A CanNotDelete lock prevents deletion while still permitting updates.

ReadOnlyWrong answer — click to see why

Why this is wrong here

A ReadOnly lock prevents all modifications, including creating and modifying resources inside the resource group, which contradicts the requirement to allow administrators to create and modify resources.

★ When this WOULD be the correct answer

A ReadOnly lock would be correct if the requirement was to prevent any changes to the resource group and its resources, such as protecting a production environment from accidental modifications while still allowing read access.

Why candidates choose this

Candidates may confuse 'prevent deletion' with 'prevent changes' and think that a ReadOnly lock is needed to block deletion, not realizing it also blocks modifications.

Delete lockWrong answer — click to see why

Why this is wrong here

Azure does not have a 'Delete lock'; the correct lock type to prevent deletion is 'CanNotDelete'. 'Delete lock' is not a valid Azure lock type.

★ When this WOULD be the correct answer

This option would be correct if the question asked about a custom lock name or a fictional scenario where a 'Delete lock' is defined as a custom role or policy. However, in standard Azure RBAC, no such lock exists.

Why candidates choose this

Candidates may be misled by the name 'Delete lock' as it intuitively suggests preventing deletion, but Azure's actual lock types are 'CanNotDelete' and 'ReadOnly'.

No lock and a budget alertWrong answer — click to see why

Why this is wrong here

A budget alert does not prevent deletion; it only notifies about spending. The question requires a lock that blocks deletion, which budget alerts cannot do.

★ When this WOULD be the correct answer

When the question asks for a method to be notified if resource costs exceed a threshold, or to enforce cost limits without blocking administrative actions, a budget alert would be correct.

Why candidates choose this

Candidates may confuse cost management controls with operational controls, thinking a budget alert can also prevent deletion by triggering an action, but alerts are read-only notifications.

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?”

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates confuse the CanNotDelete lock with the ReadOnly lock, mistakenly thinking ReadOnly still allows modifications, or they invent a non-existent 'Delete lock' option because it sounds plausible.

Detailed technical explanation

How to think about this question

Azure locks are applied at the management group, subscription, resource group, or resource scope and are inherited by all child resources. The CanNotDelete lock uses Azure Resource Manager's authorization system to block DELETE operations at the specified scope while allowing all other operations (GET, PUT, PATCH). This lock is enforced even for users with Owner permissions, making it a critical governance tool for protecting production environments from accidental deletion.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related AZ-104 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free AZ-104 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this AZ-104 question test?

Manage Azure Identities and Governance — This question tests Manage Azure Identities and Governance — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: CanNotDelete — The CanNotDelete lock prevents deletion of the resource group while still allowing all operations (read, write, modify) on resources within it. This lock type is designed specifically to protect against accidental deletion without restricting administrative actions like creating or updating resources.

What should I do if I get this AZ-104 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

8 more ways this is tested on AZ-104

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Based on the exhibit, the team must prevent accidental deletion of a resource group, but administrators still need to update settings on resources inside it. Which lock should you apply?

easy
  • A.Apply no lock and rely on RBAC alone.
  • B.Apply a ReadOnly lock to RG-Prod.
  • C.Apply a CanNotDelete lock to RG-Prod.
  • D.Apply a Contributor role assignment to RG-Prod.

Why C: Option C is correct because applying a CanNotDelete lock to RG-Prod prevents the resource group from being deleted while still allowing administrators to update settings on resources inside it. This lock type blocks delete operations but permits read and update operations, which aligns with the requirement to prevent accidental deletion without restricting management changes.

Variation 2. During a change freeze, the operations team wants to prevent accidental deletion of a production resource group and everything in it. They still need to update VM settings, change tags, and modify network rules. Which lock should be applied?

medium
  • A.Apply a ReadOnly lock to the resource group.
  • B.Apply a CanNotDelete lock to the resource group.
  • C.Assign the Reader role to all operators.
  • D.Assign an Azure Policy deny assignment at the subscription.

Why B: The CanNotDelete lock (Option B) prevents deletion of the resource group and all resources within it, while still allowing read and update operations such as modifying VM settings, changing tags, and updating network rules. This lock type is specifically designed to protect against accidental deletion during a change freeze without blocking management operations.

Variation 3. A production resource group must be protected from accidental deletion during a change freeze. Administrators still need to update VM sizes, rotate tags, and change NSG rules. Which two actions should the administrator take? Select two.

medium
  • A.Apply a CanNotDelete lock to the resource group.
  • B.Apply a ReadOnly lock to the resource group.
  • C.Place the CanNotDelete lock at the resource group scope so it covers current and future resources.
  • D.Use Azure Policy to deny all delete requests.
  • E.Add a Protected=true tag and use it to prevent deletion.

Why A: Option A is correct because applying a CanNotDelete lock to the resource group prevents the entire resource group from being deleted, while still allowing administrators to update VM sizes, rotate tags, and modify NSG rules. This lock type blocks delete operations but permits all read and write operations, aligning with the requirement to protect against accidental deletion during a change freeze while maintaining administrative flexibility.

Variation 4. You need to prevent accidental deletion of a production resource group while still allowing administrators to update resources inside it. What should you apply to the resource group?

medium
  • A.A ReadOnly lock
  • B.A CanNotDelete lock
  • C.A deny assignment
  • D.A budget alert

Why B: A CanNotDelete lock (B) prevents the resource group from being deleted while still allowing all operations (including updates) on resources within it. This is the correct choice because the requirement is to block accidental deletion of the entire resource group, not to restrict modifications to its resources.

Variation 5. You need to prevent accidental deletion of a resource group while still allowing administrators to create and modify resources inside it. Which lock should you apply?

medium
  • A.ReadOnly
  • B.CanNotDelete
  • C.Delete lock
  • D.No lock and a budget alert

Why B: The CanNotDelete lock prevents the resource group from being deleted while still allowing all operations (including create and modify) on resources within it. This is the correct choice because the requirement is specifically to block deletion, not to restrict modifications or read access.

Variation 6. You need to ensure that administrators cannot accidentally delete a production virtual network, but they must still be able to update subnet settings. Which Azure feature should you apply?

medium
  • A.A CanNotDelete lock
  • B.A ReadOnly lock
  • C.An Azure Policy deny assignment
  • D.A budget alert

Why A: A CanNotDelete lock (Azure resource lock) prevents accidental deletion of the virtual network while allowing all other operations, including updates to subnet settings. This lock type blocks DELETE requests at the Azure Resource Manager level, but permits PUT and PATCH operations, so administrators can still modify subnet configurations.

Variation 7. A production resource group must not be deleted accidentally, but administrators still need to update resources inside it. Which lock should you apply to the resource group?

easy
  • A.ReadOnly lock
  • B.CanNotDelete lock
  • C.Contributor role
  • D.Azure Policy deny assignment

Why B: The CanNotDelete lock (option B) is correct because it prevents deletion of the resource group while still allowing all other operations, including updates to resources within it. This lock type is specifically designed to protect against accidental deletion without blocking read, write, or modify actions, which aligns perfectly with the requirement that administrators need to update resources inside the group.

Variation 8. A production resource group contains VMs, public IP addresses, and a storage account. During a migration window, administrators must still be able to change settings and resize VMs, but nobody should accidentally delete any resource. Which lock should you apply to the resource group?

medium
  • A.ReadOnly
  • B.CanNotDelete
  • C.Contributor
  • D.Azure Policy

Why B: The CanNotDelete lock prevents any user or process from deleting the resource group or its resources, while still allowing all other operations including read, write, and configuration changes such as resizing VMs. This matches the requirement that administrators must be able to change settings and resize VMs but must not accidentally delete any resource.

Keep practising

More AZ-104 practice questions

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.