azureblog.co.uk
← AZ-104 study plan
AZ-104 · Manage Azure identities and governance

Manage access to Azure resources with RBAC

How Azure role-based access control works: built-in roles, the four scopes, inheritance, and how to read who has access to what.

  • 15 min
  • 3 concepts
  • Try it yourself
  • 5-question check

Learn

Azure role-based access control (Azure RBAC) decides who can do what with Azure resources. Every permission comes from a role assignment, which has three parts: a security principal (a user, group, service principal or managed identity), a role definition (a list of allowed actions), and a scope (where it applies).

Azure RBAC is separate from Microsoft Entra roles. Entra roles such as User Administrator manage the directory. Azure roles such as Contributor manage Azure resources like VMs and storage accounts.

  1. 1

    Manage built-in Azure roles

    Azure has hundreds of built-in roles, but four are fundamental. Owner has full access and can assign roles. Contributor can create and manage all resources but can't grant access. Reader can only view. User Access Administrator can manage role assignments.

    There are also service-specific roles such as Virtual Machine Contributor or Storage Blob Data Reader. Some roles cover the control plane (managing the resource) and others the data plane (reading the data inside it). Contributor on a storage account doesn't automatically let you read blobs with your Entra identity; that needs a data role such as Storage Blob Data Reader.

    Remember: Pick the narrowest role that does the job. If none fits, create a custom role.

  2. 2

    Assign roles at different scopes

    Roles can be assigned at four scopes, from broadest to narrowest: management group, subscription, resource group and resource. Assignments are inherited downwards: a role on a subscription applies to every resource group and resource in it.

    Assign roles to groups rather than individuals where you can, so access follows group membership. A subscription supports a large but finite number of role assignments, so groups also keep you well within the limit.

    Remember: Inheritance only flows down. A role on one resource group gives nothing on its neighbours or its parent.

  3. 3

    Interpret access assignments

    Azure RBAC is additive. A user's effective permissions are the sum of all their role assignments, including those inherited from higher scopes and those given through groups. Reader on a subscription plus Contributor on one resource group means the user can change resources in that group.

    Use Access control (IAM) on any scope to see role assignments, check a specific user's access with Check access, and see deny assignments. Deny assignments, for example from Azure deployment stacks or managed applications, block actions even when a role allows them.

    Remember: To find out why someone can do something, check inherited assignments and their group memberships, not only the scope you're looking at.

Scopes and inheritance

  1. Management groupAssignments here apply to every subscription in the group.
  2. SubscriptionApplies to every resource group and resource in the subscription.
  3. Resource groupApplies to every resource in the group.
  4. ResourceApplies to that one resource only.
Role assignments flow down the hierarchy, never up or sideways.

Try it

Give Alex a role at a scope and watch what it means across the hierarchy. Change the role and the scope to see inheritance at work.

This interactive part needs JavaScript.

In the portal

  • Assign a role on a resource groupAzure portal: Resource groups > your group > Access control (IAM) > Add > Add role assignment
  • Check what someone can doAzure portal: any resource > Access control (IAM) > Check access
  • See every role and its permissionsAzure portal: any resource > Access control (IAM) > Roles

Key terms

Click a card to see the definition.

Check your understanding

5 questions. Score 80% or more and these skills are marked as confident in your AZ-104 study plan.

  1. Which built-in role can manage all resources but can't grant access to others?

  2. A user is Reader on a subscription and Contributor on rg-web in it. What can they do in rg-web?

  3. You assign Contributor on rg-web. Does the user get access to rg-data in the same subscription?

  4. A user with Contributor on a storage account gets an authorisation error reading blobs with their Entra identity. Why?

  5. What's the best practice for giving the same access to a team of ten?

Sources

Facts in this lesson are from Microsoft Learn. This site isn't affiliated with Microsoft.