Identity & governance · Lesson 2 of 24

The hierarchy and RBAC

How Azure is organised, and how you give a person the right amount of power at the right place.

About 15 min · Interactive · 3 practice questions

Exam objective
Manage built-in Azure roles · Assign roles at different scopes · Interpret access assignments · Configure management groupsManage Azure identities and governance · 20–25% of the exam · typical question: "User has role A at scope X and role B at scope Y, what can they do?" and "least-privilege role for requirement Z"
In one sentence. Azure is organised as a tree (tenant → management groups → subscriptions → resource groups → resources), and you give a person a role at one point in that tree so they get the right permissions on everything below it.

Think of a filing cabinet: the cabinet is your company, drawers are subscriptions (each with its own bill), folders are resource groups, papers are the resources. A key to a drawer opens every folder in it.

1. TenantThe top level for your whole organisation: the Entra ID directory of users and groups.
Microsoft Entra IDcontoso.com
↓ contains management groups and subscriptions
2. Management groupOptional folders for grouping subscriptions by company, region or environment. Up to six levels.
MG-Corpall company subscriptions
↓ contains subscriptions
3. SubscriptionA billing unit with its own invoice, quotas and access control.
Prodproduction
Devdevelopment
↓ contains resource groups
4. Resource groupA container for related resources that live and die together.
RG-Webin Prod
RG-Datain Prod
RG-Testin Dev
↓ contains resources
5. ResourceThe actual Azure service you pay for.
VMNIC, disk
SQL / storagedatabase, files
App Serviceweb app

Nothing flows upward or sideways. A role or policy set on MG-Corp lands on Prod, Dev and everything inside them. A role set on RG-Web touches nothing in RG-Data.

Giving people access: the problem RBAC solves

Contoso has 50 employees and 20 virtual machines spread across the Prod and Dev subscriptions. Not everyone should have full access. Sarah in finance only needs to see what exists so she can check the bill. Ravi in operations must manage the web servers. Priya runs the helpdesk and must be able to give colleagues access when they join. If everyone were simply made an administrator, one mistaken click could delete production.

Azure's answer is role-based access control (RBAC): instead of making people administrators, you give each person a role (a named list of allowed actions) at a scope (one place in the tree). From that place downward, they can do what the role allows and nothing else.

A role assignment has three parts

WHOa user, a group, an app identityWHICH ROLEa named list of allowed actionsWHEREsubscription, RG or one resource+at= one role assignment. Several assignments simply add up.
PartPlain meaningSarah's case
Who (the security principal (the thing being given access: a user, a group, or an application identity))The person or team. Prefer a group so access survives staff changes.Sarah, or better the group Finance-Readers
Which role (the role definition (a named list of actions Azure allows, such as read, write, delete))Azure ships about 100 ready-made roles; four general ones cover most questions.Reader
Where (the scope (the point in the tree where the role applies; it flows down from there))Management group, subscription, resource group, or a single resource.The Prod subscription

Result: Sarah can open any resource in Prod and look at it, but every Save or Delete button is refused. She sees nothing in Dev, because Dev is not under Prod.

Quick check

Sarah has Reader on the Prod subscription. Can she view the VMs in RG-Test, which is in the Dev subscription?

The four general roles

Role names do not always say exactly what they permit, so learn these four by what they cannot do.

RoleCanCannotGive it to
ReaderLook at anything in scopeChange anythingSarah (finance)
ContributorCreate, change, delete anything in scopeGive access to others; create locksRavi (operations)
User Access AdministratorGive and remove roles; manage locksTouch the resources themselvesPriya (helpdesk)
OwnerEverything, including giving access—As few people as possible

Narrower roles exist for one resource type: Virtual Machine Contributor (manage VMs but not the network or storage they use), Network Contributor, Storage Account Contributor. The exam asks you to pick the narrowest role that still meets the requirement; this is called least privilege.

Quick check

Priya must be able to give new helpdesk staff access to VMs in RG-Prod, and must not be able to change or delete anything. Which role?

Rule 1: permissions flow downward

A role given at the subscription applies to every resource group and resource inside it. A role given on RG-Web applies only to what is in RG-Web. So choose the scope from the wording: "all VMs in the Prod subscription" means subscription scope; "the VMs in RG-Web only" means resource-group scope; "this one VM" means resource scope. Assign at the highest level that is still correct and do not repeat the same role on every resource below.

Rule 2: several roles add together

Ravi has Reader on the Prod subscription (so he can see everything) and Virtual Machine Contributor on RG-Web. Inside RG-Web he has both: he can see everything and manage the VMs. The narrower assignment adds power; it never removes what was inherited. There is no ordinary way to write "except Ravi" into RBAC. (Azure does have deny assignments, but you do not create them by hand; they are made for you by features such as deployment stacks, Blueprints and managed applications, and the exam only expects you to know they exist and win over grants.)

Quick check

Ravi has Reader on subscription Prod and Contributor on RG-Web. What can he do to a VM in RG-Web?

Rule 3: Entra ID roles are not Azure roles

Entra ID has its own roles for running the directory: Global Administrator, User Administrator and so on. They control users, groups and licences. They give no rights on subscriptions or resources. A new Global Administrator opens the portal and sees no subscriptions at all. Two fixes: someone with Owner gives them an Azure role, or they use elevate access (a one-time switch in Entra ID properties, "Access management for Azure resources", that grants the Global Admin the User Access Administrator role at the root of every subscription) and then assign themselves what they need. Elevated access should be removed afterwards.

Quick check

A Global Administrator signs in to the portal and sees no subscriptions. What is the most likely reason?

Rule 4: managing a storage account is not the same as reading the files in it

Changing a resource's settings is the management plane (the portal and API operations that create and configure resources). Reading or writing what is stored inside it is the data plane (operations on the contents: blobs, files, queue messages, secrets). Contributor and Owner cover the management plane. To read blobs through Entra sign-in, a person also needs a data role such as Storage Blob Data Reader. A Contributor can usually still reach the data by fetching the storage account key, unless key access has been disabled, which is why exam answers prefer Entra data roles over keys.

Memorise (definitions)

  • The three parts: who, which role, where
  • The four general roles and what each cannot do
  • Scopes from widest to narrowest: management group, subscription, resource group, resource
  • Entra roles ≠ Azure roles; elevate access exists
  • Data roles (Storage Blob Data Reader/Contributor) are separate

Apply (scenarios you must solve)

  • Pick the narrowest role and widest-correct scope for a requirement
  • Combine two assignments and say what the person can do
  • Spot that a Contributor cannot grant access or add a lock
  • Explain why a Global Administrator sees nothing
  • Decide whether a question is about configuring storage or reading its contents

Doing it in the portal

You, the admin: give Finance-Readers read access to everything in Prod

  1. Make the group Finance-Readers in Entra ID and add Sarah.
  2. Open Subscriptions › Prod › Access control (IAM) › + Add › Add role assignment.
  3. Role tab: Reader. Members tab: the group. Review + assign.
  4. Later, Ravi needs to manage VMs in RG-Web only: a second assignment, Virtual Machine Contributor at RG-Web › Access control (IAM). The two add together.
  5. Verify: RG-Web › Access control (IAM) › Check access, type the name; it lists every role they hold and where it came from.

Script: az role assignment create --assignee <group id> --role Reader --scope /subscriptions/<id>. Custom roles, when no built-in fits: IAM › + Add › Add custom role, or az role definition create with a JSON of Actions, NotActions, DataActions and AssignableScopes.

Recognise the wording. "Grant access to others, nothing else" = User Access Administrator. "Manage VMs, must not grant access" = Virtual Machine Contributor (or Contributor if more than VMs). "All resources in the subscription" = subscription scope, not every resource group one by one. "Global Administrator cannot see…" = assign an Azure role or elevate access. "Read blob data via Entra" = Storage Blob Data Reader, not Reader.

Key points

  • The hierarchy is a tree. Tenant, management groups, subscriptions, resource groups, resources.
  • Permissions flow down only. A role at the subscription covers every resource group and resource under it; nothing flows up or sideways.
  • A role assignment = who + which role + where. Several assignments add up; you do not write deny rules by hand (deny assignments exist but are created by Azure features, and they win over grants).
  • Entra ID roles are not Azure roles. A Global Administrator sees no subscriptions until given an Azure role or elevated access.
  • Least privilege wins the question. Contributor cannot grant access; User Access Administrator can grant but not change resources.
  • Managing a storage account is not reading its data. Reader/Contributor are management plane; blob access via Entra needs a Storage Blob Data role.

Formal terms: Azure RBAC, security principal, role definition, scope, role assignment, deny assignment, elevate access, management plane vs data plane.

Check your understanding

3 exam-style questions in the formats AZ-104 uses. Each is marked when you check it, with the reasoning.

0 of 3 checked

All scenarios and questions are original. None are taken from the exam, Microsoft's practice assessment or any question bank. PrepToExcel is not affiliated with Microsoft.