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

Quick Answer

The correct answer is to create a custom RBAC role for VM start, stop, and deallocate actions and assign it at the resource group scope. This is the right choice because the built-in Virtual Machine Contributor role is too broad, granting permissions like VM creation and deletion that the team does not need. By crafting a custom role that includes only the specific actions—Microsoft.Compute/virtualMachines/start/action, /deallocate/action, and /read—you enforce least-privilege access, limiting the team to exactly what they require without over-permissioning. On the AZ-104 exam, this scenario tests your understanding of Azure RBAC role definitions and scope assignment, often appearing as a question where you must choose between modifying a built-in role or creating a custom one. A common trap is selecting the Virtual Machine Contributor role because it includes start/stop, but it also includes write and delete actions, which violates the principle of least privilege. Remember the memory tip: “Custom cuts clutter”—when permissions are narrower than a built-in role, always create a custom role at the smallest necessary scope.

AZ-104 Manage Azure Identities and Governance Practice Question

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.

A team in RG-Apps must be able to start, stop, and deallocate virtual machines and read their properties. Built-in roles available to the team are broader than necessary. What should the administrator do?

Question 1mediummultiple choice
Full question →

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 role with only the required VM actions and assign it at RG-Apps scope.

Option B is correct because the team needs specific actions (start, stop, deallocate, read properties) that are a subset of the Virtual Machine Contributor role's permissions. Creating a custom role with only the required actions (Microsoft.Compute/virtualMachines/start/action, Microsoft.Compute/virtualMachines/deallocate/action, Microsoft.Compute/virtualMachines/read, etc.) and assigning it at the RG-Apps scope provides least-privilege access without granting broader capabilities like creating or deleting VMs.

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.

  • Assign Virtual Machine Contributor at the subscription scope.

    Why it's wrong here

    This would grant VM management rights across the entire subscription, which is broader than the requirement.

  • Create a custom role with only the required VM actions and assign it at RG-Apps scope.

    Why this is correct

    A custom role can include only the required actions, such as VM start, deallocate, and read, without granting unnecessary permissions. Assigning the role at RG-Apps scope keeps the permissions limited to the target resource group and is the cleanest least-privilege design.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Assign Reader and Virtual Machine Contributor together at the resource group scope.

    Why it's wrong here

    Combining built-in roles still grants more permissions than needed and does not reduce the VM management surface area.

  • Assign Owner at the resource group scope to avoid troubleshooting access issues.

    Why it's wrong here

    Owner grants full control, including permission management and deletion, which is far more access than the team needs.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often choose Virtual Machine Contributor (Option A or C) thinking it covers start/stop/deallocate, but they overlook that it also includes broader VM management actions like create, delete, and modify, which violates the least-privilege requirement stated in the question.

Detailed technical explanation

How to think about this question

Azure custom roles are defined using a JSON structure with Actions, NotActions, DataActions, and AssignableScopes. For this scenario, the custom role would include specific actions under Microsoft.Compute/virtualMachines/ (e.g., start, deallocate, read) and exclude any write or delete actions. Under the hood, Azure RBAC evaluates permissions at the scope of assignment (RG-Apps) and denies any action not explicitly allowed, ensuring granular control. A real-world scenario might involve a DevOps team that needs to power-cycle VMs for maintenance but must not be able to modify VM configurations or delete them, making a custom role essential.

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: Create a custom role with only the required VM actions and assign it at RG-Apps scope. — Option B is correct because the team needs specific actions (start, stop, deallocate, read properties) that are a subset of the Virtual Machine Contributor role's permissions. Creating a custom role with only the required actions (Microsoft.Compute/virtualMachines/start/action, Microsoft.Compute/virtualMachines/deallocate/action, Microsoft.Compute/virtualMachines/read, etc.) and assigning it at the RG-Apps scope provides least-privilege access without granting broader capabilities like creating or deleting VMs.

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

3 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 help desk team must be able to restart virtual machines in RG-App, but they must not be able to create, delete, or resize VMs. What is the best action?

medium
  • A.Assign Virtual Machine Contributor to HelpDeskGroup at the subscription scope.
  • B.Assign Contributor to HelpDeskGroup at RG-App.
  • C.Create a custom RBAC role that allows VM start, restart, and deallocate actions, then assign it at RG-App.
  • D.Assign Owner to HelpDeskGroup at RG-App and use Azure Policy to block unwanted changes.

Why C: Option C is correct because the help desk team needs only specific actions (start, restart, deallocate) without the ability to create, delete, or resize VMs. The built-in Virtual Machine Contributor role includes write permissions that allow creating and deleting VMs, so a custom RBAC role that explicitly grants only the required actions (Microsoft.Compute/virtualMachines/start/action, restart/action, deallocate/action) and is assigned at the RG-App scope meets the requirement precisely.

Variation 2. An operations team must be able to restart virtual machines in one resource group. They must not create, delete, resize, or change disks or networking. Which two actions should the administrator take? Select two.

medium
  • A.Create a custom RBAC role that includes only read and restart actions for virtual machines.
  • B.Assign the Virtual Machine Contributor role to the operations group.
  • C.Assign the custom role to the operations group at the resource group scope.
  • D.Create an Azure Policy assignment that denies VM creation in the resource group.
  • E.Apply a ReadOnly lock to the resource group.

Why A: Option A is correct because a custom RBAC role can be defined to include only the 'Microsoft.Compute/virtualMachines/read' and 'Microsoft.Compute/virtualMachines/restart/action' permissions, which precisely limits the operations team to reading and restarting VMs without allowing create, delete, resize, or disk/network changes. This aligns with the principle of least privilege.

Variation 3. A support team must be able to start, stop, and restart virtual machines in one application resource group, but they must not create or delete VMs, modify disks, or manage networking. What is the best access approach?

medium
  • A.Assign Contributor at the subscription scope so the team can manage all resources.
  • B.Create a custom RBAC role with only the required VM power actions and assign it at the resource group scope.
  • C.Assign Reader at the resource group scope and use Azure Policy to permit VM restarts.
  • D.Apply a resource lock to the resource group so the team can only make approved changes.

Why B: Option B is correct because Azure RBAC allows you to create a custom role with specific actions like Microsoft.Compute/virtualMachines/start/action, Microsoft.Compute/virtualMachines/restart/action, and Microsoft.Compute/virtualMachines/deallocate/action, and assign it at the resource group scope. This grants the support team exactly the permissions needed to start, stop, and restart VMs without allowing VM creation, deletion, disk modification, or networking changes, adhering to the principle of least privilege.

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.