Question 234 of 1,170
Manage Azure Identities and GovernanceeasyMultiple ChoiceObjective-mapped

Quick Answer

The correct answer is to apply a CanNotDelete lock to the resource group. This lock type is the ideal choice because it blocks delete operations on the resource group itself while still allowing administrators to read and update settings on the resources inside it, perfectly matching the requirement to prevent accidental deletion without restricting management changes. On the AZ-104 exam, this scenario tests your understanding of Azure resource locks and their scope, often appearing as a trick where candidates mistakenly apply a ReadOnly lock, which would block all updates. A common trap is confusing the lock’s effect on the resource group versus its child resources—remember that a CanNotDelete lock on the parent does not prevent updates to the children. For a quick memory tip, think “CanNotDelete = Can still update, just can’t remove.”

AZ-104 Manage Azure Identities and Governance Practice Question

This AZ-104 practice question tests your understanding of manage azure identities and governance. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. 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.

Exhibit

Resource group: RG-Prod
Current lock:
- Type: None

Change request:
- Prevent accidental deletion of RG-Prod and its resources.
- Allow administrators to change VM sizes, tags, and NSG rules when needed.

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?

Question 1easymultiple choice
Full question →

Exhibit

Resource group: RG-Prod
Current lock:
- Type: None

Change request:
- Prevent accidental deletion of RG-Prod and its resources.
- Allow administrators to change VM sizes, tags, and NSG rules when needed.

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

Apply a CanNotDelete lock to RG-Prod.

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.

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.

  • Apply no lock and rely on RBAC alone.

    Why it's wrong here

    RBAC does not stop deletion if someone already has sufficient permissions, so this does not meet the requirement.

  • Apply a ReadOnly lock to RG-Prod.

    Why it's wrong here

    ReadOnly blocks write operations as well as delete operations, so it would prevent the updates the team still needs.

  • Apply a CanNotDelete lock to RG-Prod.

    Why this is correct

    CanNotDelete prevents accidental deletion while still allowing normal update operations on existing resources in the scope.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Apply a Contributor role assignment to RG-Prod.

    Why it's wrong here

    Contributor is a permission role, not a protection control, and it does not prevent deletion.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often confuse CanNotDelete with ReadOnly, mistakenly thinking that preventing deletion requires blocking all write operations, but CanNotDelete specifically targets delete operations while allowing updates.

Detailed technical explanation

How to think about this question

Azure resource locks operate at the management plane level, overriding any RBAC permissions for the locked scope. A CanNotDelete lock is enforced via Azure Resource Manager, which checks the lock before allowing delete operations; it does not affect read or update operations. In a real-world scenario, this lock is often applied to production resource groups to prevent accidental deletion while allowing DevOps teams to modify configurations or deploy updates.

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 company's IT admin needs to give a contractor read-only access to production logs without sharing account credentials. Using role-based access control (RBAC) and temporary scoped permissions — not a permanent shared password — is the correct pattern. Questions like this test whether you can apply least-privilege access across cloud identity services.

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: Apply a CanNotDelete lock to RG-Prod. — 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.

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. 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 2. 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 3. 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 4. 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 5. 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?

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

Why B: 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.

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.