Assign an RBAC Role in Microsoft Azure

Lab overview

Give someone exactly the access they need and nothing more. In this lab, you open the ProdRG resource group, review its current role assignments under Access control (IAM), assign the Virtual Machine Contributor role to Dave Jones, and confirm the assignment appears in the list once it completes.

Why you'd do this

Being able to sign in to Azure gives a user nothing by itself. Every action in the portal — starting a VM, reading a storage account, deleting a resource group — is checked against role-based access control, and until someone has a role at the right scope, the resources simply don't appear for them. RBAC is how you avoid the two bad extremes: making everyone an Owner because it's easy, or routing every change through one admin because nobody else has rights.

The role you pick decides what they can do; the scope you assign it at decides where. Assigning Virtual Machine Contributor on ProdRG lets Dave create, start, stop, and resize VMs in that one resource group, but not touch the virtual network they sit on, not see other resource groups, and not change who else has access — Contributor roles never include permission management. Assigned at the subscription instead, the same role would cover every VM in the company. Always ask "what's the smallest scope that gets the job done" before you ask which role.

Two habits to take from the steps. First, the View button before you add anything: checking who already has what prevents duplicate or conflicting assignments, and it's the first thing an auditor asks for. Second, the wait at the end is real — role assignments can take a few minutes to propagate, so a user who says "I still can't see it" thirty seconds after you clicked Review + assign hasn't necessarily found a bug. If Dave needs the same access in several resource groups, you'd assign the role to a group he's in rather than to him, which is why the security group lab precedes this one.

For certification prep, Azure RBAC is a core AZ-104 objective, managing access to Azure resources appears in SC-300, and role assignments are covered under identity and access in MS-102.

Lab details

  • Resource Group: ProdRG
  • Role assigned: Virtual Machine Contributor
  • Assigned to: Dave Jones

Learning objectives

  1. Navigate to Access control (IAM) on a resource group in the Azure portal.
  2. Review existing role assignments before making changes.
  3. Assign a built-in RBAC role, Virtual Machine Contributor, to a user at resource group scope.
  4. Verify the role assignment after it completes.

Exam relevance

  • AZ-104 — Azure Administrator — Manage role-based access control, Assign Azure roles to users and groups.
  • MS-102 — Microsoft 365 Administrator — Manage identity and access, Configure role assignments.
  • SC-300 — Identity and Access Administrator — Implement Azure RBAC, Manage access to Azure resources.

Step-by-step instructions

  1. Click Resource groups and select ProdRG.
  2. Click Access Control (IAM).
  3. Click the View button to review current role assignments.
  4. Click the Add dropdown and select Add role assignment.
    • Type virtual machine in the search bar and press Enter.
    • Select Virtual Machine Contributor.
    • Click Next.
  5. Select the member to assign the role to:
    • Click Select Members.
    • Select Dave Jones from the list.
    • Click Select.
    • Click Next.
  6. Click Next, then click Review + assign to finalize.
  7. Wait for the assignment to complete.
  8. Scroll down to confirm the Virtual Machine Contributor role has been successfully assigned to Dave Jones.

An Introduction to Microsoft Entra ID

Learn what you need to know to get started with Microsoft Entra ID with this easily-digestible 5-hour bootcamp from best-selling instructor, Thomas Mitchell.

Disable these ads by becoming a labITpro Supporter!

Azure vNets Explained

Want to learn about Azure virtual networks? In this quick-hitting explanation, you’ll learn what they are, what they do, and you’ll learn about key Azure vNet features.

Disable these ads by becoming a labITpro Supporter!