nerdexam
Microsoft

AZ-500 · Question #284

You have an Azure subscription that contains the resources shown in the following table. You need to ensure that ServerAdmins can perform the following tasks: - Create virtual machines in RG1 only…

The correct answer is A. a custom RBAC role for RG2 F. the Virtual Machine Contributor role for RG1. Explanation Assigning the Virtual Machine Contributor role for RG1 (F) grants ServerAdmins exactly the permissions needed to create and manage VMs within RG1, satisfying the first requirement with least privilege. For the second requirement - connecting VMs to existing virtual…

Submitted by fatima_kr· Mar 6, 2026Secure identity and access

Question

You have an Azure subscription that contains the resources shown in the following table. You need to ensure that ServerAdmins can perform the following tasks: - Create virtual machines in RG1 only. - Connect the virtual machines to the existing virtual networks in RG2 only. The solution must use the principle of least privilege. Which two role-based access control (RBAC) roles should you assign to ServerAdmins? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

Exhibits

AZ-500 question #284 exhibit 1
AZ-500 question #284 exhibit 2

Options

  • Aa custom RBAC role for RG2
  • Bthe Network Contributor role for RG2
  • Cthe Contributor role for the subscription
  • Da custom RBAC role for the subscription
  • Ethe Network Contributor role for RG1
  • Fthe Virtual Machine Contributor role for RG1

How the community answered

(22 responses)
  • A
    68% (15)
  • C
    9% (2)
  • D
    5% (1)
  • E
    18% (4)

Explanation

Explanation

Assigning the Virtual Machine Contributor role for RG1 (F) grants ServerAdmins exactly the permissions needed to create and manage VMs within RG1, satisfying the first requirement with least privilege. For the second requirement - connecting VMs to existing virtual networks in RG2 - a custom RBAC role for RG2 (A) is necessary because the standard Network Contributor role grants far more permissions than needed (including creating/deleting networks), whereas a custom role can be scoped to only allow joining/reading existing virtual networks.

Why the distractors are wrong:

  • B (Network Contributor for RG2): Grants excessive permissions over RG2's network resources (create, delete, modify), violating least privilege.
  • C (Contributor for subscription): Far too broad - grants full access across the entire subscription.
  • D (Custom role for subscription): Subscription-level scope is wider than necessary; roles should be scoped to the specific resource group.
  • E (Network Contributor for RG1): ServerAdmins don't need network permissions in RG1, only VM creation rights there.

Memory Tip

Think "right role, right scope" - always match the minimum permission to the smallest scope. When a built-in role does too much, reach for a custom role. When a built-in role does exactly what's needed at the right scope, use it as-is (like VM Contributor on RG1).

Topics

#Azure RBAC#Least Privilege#Custom Roles#Virtual Machine Management

Community Discussion

No community discussion yet for this question.

Full AZ-500 Practice