Lesson 1 of 3 Azure Role-Based Access Control

Choosing Built-in Azure Roles

Azure RBAC authorizes every management operation on Azure resources. This lesson explains how role definitions are built and what the fundamental and service-specific roles allow.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe the parts of a role definition: Actions, NotActions, DataActions and AssignableScopes.
  • Distinguish between Owner, Contributor, Reader, User Access Administrator and Role Based Access Control Administrator.
  • Choose a service-specific or data role for a least-privilege requirement.

How a role definition is built

A role definition is a collection of permissions. Actions list allowed control plane operations in the form Microsoft.Provider/resourceType/operation, such as Microsoft.Compute/virtualMachines/start/action, and wildcards such as Microsoft.Compute/* allow every operation of a provider. NotActions subtract operations from the allowed actions. DataActions and NotDataActions do the same for data plane operations, such as Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read. AssignableScopes lists where the role can be assigned.

NotActions are not a deny: they only remove operations from that role. If another role assigned to the same user grants the removed operation, the user can perform it. The Roles tab on any Access control (IAM) page lists the built-in roles and shows each one's JSON.

The following diagram compares a custom role for operators who may only start, stop and restart VMs with the built-in alternatives.

Least privilege for operators who may only start, stop and restart VMs in RG-App. Virtual Machine Contributor also allows creating, deleting and resizing VMs, and Contributor allows changing everything. A custom role with just the start, power-off, restart and read actions, assigned at RG-App, meets the requirement.
The role definition is abbreviated.
Match the pairs

Parts of a role definition

Exam skills 1.2.1

Match each part of a role definition with what it holds.

Log in to try this activity Interactive activities are free with an account.

The fundamental roles

Five general-purpose roles apply to all resource types. Owner grants full access to manage all resources and to assign roles. Contributor grants full access to manage all resources but not to assign roles or manage access. Reader allows viewing resources but not changing them. User Access Administrator manages user access to resources but cannot manage the resources themselves. Role Based Access Control Administrator manages role assignments and, unlike User Access Administrator, cannot manage other access settings; it is designed to be combined with conditions that limit which roles it can assign and to whom. The comparison below summarizes them.

Owner
Manage resourcesYes
Assign rolesYes
Typical holderSubscription or workload owner
Choose when Full control including delegation
Contributor
Manage resourcesYes
Assign rolesNo
Typical holderEngineers who build resources
Choose when Build and manage, no delegation
Reader
Manage resourcesNo (view only)
Assign rolesNo
Typical holderAuditors and support staff
Choose when View only
User Access Administrator
Manage resourcesNo
Assign rolesYes
Typical holderAccess administrators
Choose when Grant access without managing resources
Scenario questions

Picking a general role

Exam skills 1.2.1

Choose the general-purpose role that grants what each person needs and no more.

Log in to try this activity Interactive activities are free with an account.

Service-specific and data roles

Most built-in roles are scoped to one service, which keeps permissions narrow. Virtual Machine Contributor manages VMs but not the VNet or storage account they connect to and does not grant sign-in to the VM; Virtual Machine Administrator Login and Virtual Machine User Login grant sign-in with Microsoft Entra credentials. Network Contributor manages networks, Storage Account Contributor manages storage accounts (including listing keys), and Backup Operator, Monitoring Reader and Tag Contributor serve their own areas.

Data roles grant data actions: Storage Blob Data Reader, Storage Blob Data Contributor and Storage Blob Data Owner for blobs, Storage Queue Data roles for queues, and Storage File Data SMB Share roles for Azure Files. A user with only Reader on a storage account can see the account but cannot read blobs with Microsoft Entra authorization. When no built-in role fits, a custom role can be cloned from a built-in one.

Sort into groups

Managing the service or reading the data?

Exam skills 1.2.1

Decide whether each role works on the control plane or grants access to data.

Log in to try this activity Interactive activities are free with an account.
Worked example

Least privilege for a VM operator

Operators must be able to start, stop and restart the VMs in the resource group RG-App, and nothing else. They must not be able to create or delete VMs or change networking. Which role assignment meets the requirement with the least privilege?

No built-in role grants exactly start, stop and restart: Virtual Machine Contributor also allows creating, deleting and resizing VMs, and Contributor allows changing everything. The least privileged solution is a custom role with the actions Microsoft.Compute/virtualMachines/start/action, .../powerOff/action, .../deallocate/action, .../restart/action and .../read, assigned to the operators' group at RG-App. If the question limits the answer to built-in roles, Virtual Machine Contributor at RG-App is the closest fit.

Check yourself

A role's NotActions exclude deleting VMs. Can a user with that role and also Contributor delete a VM?

Show answer

Yes. NotActions only subtract from that one role; Contributor still grants the delete action, because Azure RBAC is additive.

Exam Tips

Remember for the exam

  • Contributor manages resources but cannot assign roles.
  • NotActions subtract from one role; they are not a deny.
  • Reading data with Microsoft Entra ID needs a data role, such as Storage Blob Data Reader.
  • Virtual Machine Contributor does not include access to the VNet or sign-in to the VM.