Azure RBAC: Built-in Roles and Scopes
30-second answer
Azure role-based access control (RBAC) grants access with a role assignment: a security principal (user, group, service principal or managed identity) + a role definition (a set of allowed Actions) + a scope. Scopes are management group, subscription, resource group and resource, and assignments inherit downward. The four general built-in roles are Owner (everything, including granting access), Contributor (everything except granting access), Reader (view only) and User Access Administrator (manage access only); Role Based Access Control Administrator can assign roles with conditions. Service roles such as Virtual Machine Contributor give narrower rights. Assign in Access control (IAM) or with az role assignment create.
Exam objective: 1.2.1 Manage built-in Azure roles. 1.2.2 Assign roles at different scopes. (Skills measured as of April 17, 2026)
Simulations
Feel it before you read it. No account needed, nothing leaves this page.
Search for <strong>Resource groups</strong>. Roles can be assigned at a management group, subscription, resource group or single resource.
👆 Click the glowing item in the portal to continue
Read the steps as text
- Search for Resource groups. Roles can be assigned at a management group, subscription, resource group or single resource.
- Type resource groups in the search bar and pick Resource groups under Services.
- Open rg-app → Access control (IAM).
- Two assignments are inherited from higher scopes. Select + Add → Add role assignment.
- Pick the smallest role that does the job. Virtual Machine Contributor manages VMs but can't sign in to them or touch the VNet.
- Assign to a group, not to individuals. When people join or leave the team, their access follows.
- Select Review + assign. CLI: az role assignment create --assignee App-Ops --role "Virtual Machine Contributor" --resource-group rg-app.
- Privileged roles get conditions that limit which roles the person may hand out. That keeps delegated admins from creating new Owners.
🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.
🖱️ Drag to rotate · scroll or pinch to zoom
Role assignments flow down
An Azure role assignment = who (user, group, service principal, managed identity) + role definition + scope. Assign it at a management group and it inherits to every subscription, resource group and resource below.
🤔 What happens if…
Read this tour as text
- Users and groups in your tenant. Your Microsoft Entra tenant holds users and groups. In an assigned group you add people yourself. In a dynamic group a rule such as
user.department -eq "Sales"adds and removes them as their properties change (Entra ID P1). - Licenses and guests. Group-based licensing gives every member of a group a license, and takes it back when they leave. A direct assignment needs the user's usage location first. A guest from a partner tenant signs in with their own account (B2B collaboration).
- Self-service password reset. SSPR lets users reset their own password at aka.ms/sspr. You choose who it's for (None, Selected group or All) and how many methods they must prove (1 or 2). Users must register methods before they can use them.
- The management ladder. Management groups sit above subscriptions, which hold resource groups, which hold resources. You can nest management groups six levels below the Tenant Root Group. Move a subscription and it takes on its new parent's policies and roles.
- Role assignments flow down. An Azure role assignment = who (user, group, service principal, managed identity) + role definition + scope. Assign it at a management group and it inherits to every subscription, resource group and resource below.
- Effective access. Roles add up. Owner does everything, Contributor everything except grant access, Reader only looks, and User Access Administrator only manages access. A deny assignment beats every role.
- Azure Policy: deny, audit, modify. Azure Policy checks what gets deployed. Deny refuses it, Audit lets it in but flags it non-compliant, Modify changes it (for example adds a tag) and needs a managed identity. A remediation task fixes resources that already exist.
- Locks and tags. A CanNotDelete lock lets people change a resource but not delete it. A ReadOnly lock blocks every write. Locks apply to everyone, Owners too. Tags on a resource group aren't inherited unless a policy copies them down.
- Budgets and Advisor. A budget watches spend for a scope and sends alerts at thresholds, on actual or forecasted cost, optionally to an action group. It doesn't stop anything by itself. Azure Advisor points at savings like idle VMs.
Ben needs to read everything in the company and manage one app. Put the subscription under a management group, give Ben Reader high up and Contributor low down, read his effective access, see what Contributor still can't do, and move a resource between resource groups.
🎓 Education-only simulation. Your lab is saved in this browser, so you can leave and continue later.
😟 THE PROBLEM
Everyone in IT is an Owner of the production subscription.
😊 THE SOLUTION
Give each team the smallest built-in role at the smallest scope.
- Owner for everyone✓ Least-privilege built-in roles
- Access at the wrong level✓ Pick the right scope
- Per-person assignments✓ Assign roles to groups
Start with a question
How does a hotel make sure cleaners can open every room on their floor, but not the safe?
A hotel doesn’t give everyone a master key. Cleaners get a card that opens every room on floor 3. The manager’s card opens every floor. The night auditor’s card opens the office but no guest rooms. Each card is a role, and the floor or building it works on is the scope.
Azure RBAC works the same way. You give a person or group a role (what they can do) at a scope (where), and it works there and everywhere underneath.
Explain it like I’m 10
The technical explanation
Who, what, where
A role assignment has three parts:
- Security principal: a user, group, service principal (an app) or managed identity.
- Role definition: a list of permissions written as Actions (control plane, like
Microsoft.Compute/virtualMachines/start/action), NotActions (taken out), DataActions and NotDataActions (data plane, like reading blobs). - Scope: one of four levels, each inheriting from the one above.
Management group /providers/Microsoft.Management/managementGroups/mg-contoso
Subscription /subscriptions/<id>
Resource group /subscriptions/<id>/resourceGroups/rg-app
Resource /subscriptions/<id>/resourceGroups/rg-app/providers/Microsoft.Compute/virtualMachines/vm-app01
Built-in roles you must know
| Role | Can do | Can’t do | Portal tab |
|---|---|---|---|
| Owner | Everything, including role assignments | Bypass locks or deny assignments | Privileged administrator roles |
| Contributor | Create, change and delete any resource | Assign roles, delete locks, manage Blueprints assignments | Privileged administrator roles |
| Reader | View everything | Change anything | Job function roles |
| User Access Administrator | Manage role assignments | Create or change resources | Privileged administrator roles |
| Role Based Access Control Administrator | Assign roles (optionally limited by a condition) | Manage access through other routes like Azure Policy | Privileged administrator roles |
| Virtual Machine Contributor | Manage VMs, disks, NICs | Manage the VNet or storage, sign in to the VM | Job function roles |
| Network Contributor | Manage networks | Manage VMs | Job function roles |
| Storage Blob Data Reader | Read blob data (DataActions) | Manage the storage account | Job function roles |
Use the smallest role at the smallest scope, and assign it to a group. When nothing fits, write a custom role in JSON with your own Actions and AssignableScopes.
Assigning roles
Portal: open the scope → Access control (IAM) → + Add → Add role assignment → Role tab (Job function roles or Privileged administrator roles) → Members tab (user, group, or service principal / managed identity) → Conditions (privileged roles only) → Review + assign.
# Resource group scope
az role assignment create --assignee app-ops@contoso.com --role "Virtual Machine Contributor" --resource-group rg-app
# Management group scope: every subscription below inherits it
az role assignment create --assignee ben@contoso.com --role Reader \
--scope /providers/Microsoft.Management/managementGroups/mg-contoso
az role definition list --name "Virtual Machine Contributor" # read the permissions
New-AzRoleAssignment -SignInName ben@contoso.com -RoleDefinitionName Reader -Scope "/providers/Microsoft.Management/managementGroups/mg-contoso"
Changes usually apply within minutes, though they can take longer to reach every service. A subscription can hold up to 4,000 role assignments.
Azure roles vs Microsoft Entra roles
Azure roles control Azure resources. Microsoft Entra roles (Global Administrator, User Administrator, License Administrator) control the directory. A Global Administrator has no Azure resource access by default; they can elevate access (Entra ID → Properties → Access management for Azure resources) to get User Access Administrator at root scope /, and should turn it off afterwards.
-
1 High up
Reader at mg-contoso: Ben can read every subscription below.
-
2 Low down
Contributor on rg-app: he can also change things there.
-
3 Add up
In rg-app he has Reader + Contributor. Everywhere else, Reader.
-
4 Limit
He still can't grant access: Contributor excludes Microsoft.Authorization writes.
Architect level PIM and conditions
Privileged Identity Management (PIM), part of Entra ID P2, makes Azure and Entra roles eligible instead of permanent: people activate them for a few hours with a justification and MFA. Role assignment conditions (ABAC) narrow an assignment further, for example Storage Blob Data Reader only on blobs tagged project=alpine, or RBAC Administrator only for specific roles. Both show up on the Assignment type and Conditions tabs of Add role assignment.
Real-world business scenario
Litware Insurance (fictional)
- The problem
- Twenty-two people were Owner on the production subscription, so anyone could delete anything or hand out access, and auditors flagged it every quarter.
- What they used
- Owner cut to two platform admins (eligible through PIM). App teams got Contributor on their own resource groups through groups, the network team got Network Contributor at the subscription, the helpdesk got Reader at the management group, and team leads got RBAC Administrator with a condition that blocks privileged roles.
- Why that choice
- Each team can still do its job, but only the platform admins can change access across the subscription.
- The result
- Permanent Owner assignments went from 22 to 0, and the next audit passed without access findings.
When to use it and when not to
✓ Use it when…
- Deciding who can create, change, read or delete Azure resources.
- Delegating a resource group to an app team (Contributor or a job-function role).
- Giving apps and automation access through managed identities.
✕ Think twice when…
- Controlling what can be deployed, such as allowed regions. Use Azure Policy.
- Protecting a resource from deletion by everyone. Use a resource lock.
- Managing users and licenses. Use Microsoft Entra roles.
↔ Alternatives to consider
- Custom roles when no built-in role is narrow enough.
- PIM for just-in-time privileged access.
Test yourself with exercises
5 original practice questions in the AZ-104 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.
Interview preparation
Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.
Beginner What are the three parts of an Azure role assignment?
Model answer
Who, what and where. Who is the security principal, such as a user or group. What is the role definition, like Reader. Where is the scope, such as one resource group. Put them together and that person can do that set of things in that place and everything below it.
Intermediate Contributor or Owner for an app team?
Model answer
Contributor on their own resource group in most cases. They can build and change everything they need, but they can't give access to anyone else or remove locks. I'd keep Owner for a few platform admins, ideally through PIM so it's only active when needed.
Experienced developer How would you let a team lead grant access without letting them create new Owners?
Model answer
Assign Role Based Access Control Administrator with a condition, either limited to specific roles and principals or the option that blocks assigning Owner, User Access Administrator and RBAC Administrator. That delegates day-to-day access without handing over the keys to the subscription.
Scenario The VM team needs to start and stop VMs in rg-app but must not change the network. Which role and scope?
Model answer
Virtual Machine Contributor at the rg-app resource group, assigned to the VM team's group. It manages VMs and their disks but doesn't give rights over the virtual network or let them sign in to the VMs. If even that's too much I'd write a custom role with just start, deallocate and read.
Quick revision
Key points
- Role assignment = security principal + role definition + scope.
- Scopes - management group, subscription, resource group, resource. Assignments inherit downward.
- Owner = all + grant access. Contributor = all except grant access. Reader = view. User Access Administrator = access only.
- Prefer job-function roles (Virtual Machine Contributor, Network Contributor) at the smallest scope, assigned to groups.
- Azure roles are separate from Microsoft Entra roles like Global Administrator.
Important terminology
- Security principal
- Who gets access - a user, group, service principal or managed identity.
- Role definition
- A named list of allowed Actions, NotActions, DataActions and NotDataActions, such as Contributor.
- Scope
- Where an assignment applies - a management group, subscription, resource group or single resource.
- Role assignment
- The link of a principal, a role definition and a scope. It's what actually grants access.
- User Access Administrator
- A built-in role that manages access to Azure resources but can't manage the resources themselves.
- Role Based Access Control Administrator
- A built-in role that can assign roles, usually limited by a condition on which roles and principals.
- Custom role
- A role you define in JSON when no built-in role fits, with assignable scopes you choose.
Common mistakes
- Giving Contributor when someone also needs to grant access. Contributor can't create role assignments.
- Assigning roles to individuals instead of groups, which leaves access behind when people move.
Exam tips
- "Manage VMs but not the virtual network" = Virtual Machine Contributor.
- "Grant access to others without managing resources" = User Access Administrator.
- "Apply to every subscription in the company with one assignment" = assign at a management group.
Five quick revision questions
-
1.Which role can manage resources but not grant access?Show
Contributor.
-
2.What are the four Azure RBAC scope levels?Show
Management group, subscription, resource group, resource.
-
3.Which command assigns a role?Show
az role assignment create --assignee ... --role ... --scope ...
-
4.Which role manages access but not resources?Show
User Access Administrator.
-
5.Do Azure role assignments inherit to child scopes?Show
Yes. An assignment applies at its scope and every scope below it.
Official references
Finished this lesson? Tick it off. Your progress is saved in this browser.
Next up: Interpret Access Assignments and Effective Access
Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges.