Courseiva
Manage Azure Identities and GovernancemediumMultiple SelectObjective-mapped

Azure Custom RBAC Role: Grant VM Power Operations Without Delete Access

An administrator wants to let a help desk group start, stop, and restart virtual machines in one resource group, but the group must not be able to delete the VMs or any other resource in the group. Which two actions should the administrator take? Select two.

Quick Answer

The answer is to create a custom RBAC role and assign it at the resource group scope. This is correct because a custom role allows you to precisely define allowed actions, such as Microsoft.Compute/virtualMachines/start/action, stop, and restart, while explicitly excluding delete permissions like Microsoft.Compute/virtualMachines/delete. By scoping the assignment to the resource group, you ensure the help desk group can only perform these power operations on VMs within that specific group, without affecting resources elsewhere. On the AZ-104 exam, this scenario tests your understanding of the principle of least privilege and the difference between built-in roles (which often include delete rights) and custom roles. A common trap is choosing a built-in role like Virtual Machine Contributor, which grants delete access; always remember that custom roles are required when you need to strip away specific permissions. Memory tip: think “custom + scope” — custom for fine-grained actions, scope to limit the blast radius.

⚠ Common exam trap

Watch out — candidates often choose Virtual Machine Contributor (Option C) thinking it provides only VM management, but it actually includes delete permissions and broader resource control, or they incorrectly combine a CanNotDelete lock (Option D) with an existing role, not realizing the lock does not grant the required start/stop/restart actions.

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 a custom RBAC role with only VM start, stop, restart, and read actions.

Creating a custom RBAC role with only VM start, stop, restart, and read actions ensures the help desk group can perform only those specific operations without any delete permissions. This role must be assigned at the resource group scope (Option B) to limit its effect to that resource group, preventing the group from modifying or deleting resources in other scopes. Together, these two actions fulfill the requirement precisely.

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 a custom RBAC role with only VM start, stop, restart, and read actions.

    Why this is correct

    A custom role is required because the built-in roles are broader than the help desk's task. Limiting the actions keeps the permission set aligned with the actual operational need.

  • Assign the custom role to the help desk group at the resource group scope.

    Why this is correct

    The resource group scope ensures the help desk can manage only the VMs in that group. Group assignment also keeps future membership changes easy to manage.

  • Assign Virtual Machine Contributor to the help desk group.

    Why it's wrong here

    Virtual Machine Contributor includes far more capabilities than start, stop, and restart. It would violate the requirement to prevent deletion and other management actions.

  • Apply a CanNotDelete lock to the resource group.

    Why it's wrong here

    A CanNotDelete lock blocks deletions, but it does not grant the operational permissions needed to start or stop VMs. RBAC is still required.

  • Use Azure Policy to block VM deletion and leave RBAC unchanged.

    Why it's wrong here

    Policy is not a substitute for the required operational permissions. The group still needs a role assignment that allows the start, stop, and restart actions.

Quick reference

Access Control Model Comparison

ModelAcronymWho Controls Access?Best For
Discretionary Access ControlDACResource ownerSmall teams, file shares
Mandatory Access ControlMACSystem / security labelsClassified govt / military
Role-Based Access ControlRBACAdministrator (via roles)Enterprise environments
Attribute-Based Access ControlABACPolicy engine (user + resource attributes)Fine-grained, dynamic policies
Rule-Based Access ControlRuBACSystem rules / ACLsFirewall rules, network ACLs

About these practice questions

This AZ-104 question is part of Courseiva's 1,049-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way 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. You need to let a junior administrator manage virtual machines only in the RG-Dev resource group. The administrator must not be able to change role assignments or manage other resource groups. Which role assignment should you use?

medium
  • A.Owner at the RG-Dev scope
  • B.Virtual Machine Contributor at the RG-Dev scope
  • C.Reader at the subscription scope
  • D.Contributor at the subscription scope

Why B: The Virtual Machine Contributor role at the RG-Dev scope grants the junior administrator full permissions to manage virtual machines (including start, stop, restart, delete, and modify VM configurations) but explicitly denies the ability to manage role assignments (RBAC) or access to other resource groups. This aligns with the principle of least privilege, ensuring the administrator can perform their required tasks without exceeding their authority.

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.