Azure role-based access control

AZ-104 Azure AdministratorIdentities and governanceAbout 25 minutesBy Cloud Hands On

Grant exactly the access people need with role assignments at the right scope, and read who can do what.

In this lesson you'll learn

1. Who, what and where

New to RBAC? Start here

RBAC answers one question: who can do what, and where? A role assignment joins three things together, like a key card that opens certain doors in certain buildings.

Security principal plus role definition plus scope equals role assignment WhoSecurity principaluser, group, identity + WhatRole definitione.g. Contributor + WhereScopee.g. rg-web = Roleassignment
Assign roles to groups rather than individuals wherever you can.

2. Scope and inheritance

Roles assigned at a scope flow down to everything beneath it. Try it: choose where to assign the role and see what it reaches.

Try it in the app. This lesson has an interactive scope explorer here. Open the lesson in the exam app

RBAC is additive. A user's permissions are the sum of every assignment at that scope and above. Reader on the subscription plus Contributor on a resource group means Contributor on that group. Only a deny assignment can take permissions away.

3. The roles you must know

RoleManage resourcesGrant access
OwnerYesYes
ContributorYesNo
ReaderView onlyNo
User Access AdministratorNoYes
Role Based Access Control AdministratorNoYes, can be limited by conditions

Service-specific roles follow a pattern: Virtual Machine Contributor, Network Contributor and Storage Account Contributor manage one resource type and cannot grant access.

Control plane roles manage the storage account. Data plane roles read and write the blobs inside it. Storage account st-sskaiser Control planeCreate, configure, delete the accountContributor, Storage Account Contributor Data planeRead and write the blobs insideStorage Blob Data Reader / Contributor
Contributor can manage the account but cannot read blob data through Entra ID.

4. Entra roles versus Azure roles

ItemMicrosoft Entra rolesAzure roles (RBAC)
ControlsThe directory: users, groups, licences, domainsAzure resources: VMs, storage, networks
ExamplesGlobal Administrator, User AdministratorOwner, Contributor, Reader
ScopeTenant or administrative unitManagement group, subscription, resource group, resource

A Global Administrator has no Azure resource access by default. They can switch on Access management for Azure resources (elevate access), which grants User Access Administrator at the root scope. Turn it off again when finished.

5. Custom roles

{
  "Name": "VM Operator",
  "Actions": [
    "Microsoft.Compute/virtualMachines/start/action",
    "Microsoft.Compute/virtualMachines/restart/action",
    "Microsoft.Compute/virtualMachines/read"
  ],
  "NotActions": [],
  "DataActions": [],
  "AssignableScopes": ["/subscriptions/<id>/resourceGroups/rg-web"]
}
  • Actions are control plane permissions. DataActions are data plane permissions, such as reading blobs or signing in to a VM.
  • AssignableScopes limits where the role can be assigned.
  • Export roles as JSON to copy them between tenants.

Example

SS Kaiser's night shift must restart frozen VMs but never delete or resize them. No built-in role fits, so the team creates the VM Operator role above and assigns it to the NightShift group on the production resource group.

Exam traps to remember

  • Granting access needs Owner, User Access Administrator or RBAC Administrator. Contributor cannot.
  • Least privilege means the narrowest role and the narrowest scope that works.
  • For a resource to deploy using its own identity, enable its managed identity first, then assign the role.
  • Check access in the IAM blade shows exactly what a principal can do at a scope.

Test yourself: 3 check questions and exam-style practice questions on this topic are in the AZ-104 Azure Administrator app.

Practise in the app

Keep going