Azure RBAC vs Azure Policy: Who Can Act vs What Is Allowed
A user tries to create a virtual machine and fails. Was the problem identity, configuration, or both?
- Azure RBAC decides who can perform an action.
- Azure Policy decides what properties a resource may have.
RBAC controls the person; Policy controls the resource. Most mature Azure environments use both.
Azure RBAC: identity, role, and scope
An Azure RBAC role assignment has three parts:
- Security principal: a user, group, service principal, or managed identity
- Role definition: the set of allowed actions
- Scope: the level where the assignment applies
RBAC is primarily an allow model: without an applicable assignment granting an action, the principal cannot perform it. Assignments are inherited by child scopes.
The scope ladder
Assignments can be made at progressively narrower levels:
Management group → Subscription → Resource group → Resource
A role assigned at a subscription is inherited by resource groups and resources in that subscription. A role assigned to one resource group does not grant the same rights in a sibling resource group. This inheritance is why broad assignments need care: Owner at the subscription is much more powerful than Owner inside a disposable test resource group.
Common built-in roles
| Role | What it allows |
|---|---|
| Owner | Full access to manage resources, including the ability to assign roles and manage access |
| Contributor | Create and manage resources, but not grant access to others through role assignments |
| Reader | View resources and configuration, but not change them |
| User Access Administrator | Manage user access and role assignments, without general resource-management rights |
A developer might receive Contributor on an application resource group. That lets the developer deploy and change the resources but not make another person an Owner. An auditor might receive Reader at a management-group scope for visibility across subscriptions.
RBAC answers questions such as, “Can Ana create a storage account in this resource group?” or “Can this automation identity restart that virtual machine?”
Azure Policy: guardrails for resource configuration
Azure Policy evaluates resource properties against rules. A policy definition describes the condition and effect. Related definitions can be grouped into an initiative, sometimes called a policy set. The definition or initiative is then assigned at a scope such as a management group, subscription, or resource group, with parameters and possible exclusions.
Common policy effects
| Effect | What happens |
|---|---|
| Deny | Blocks a noncompliant create or update request |
| Audit | Allows the request but records and reports noncompliance |
| Append | Adds required fields during creation or update |
| DeployIfNotExists | Deploys a related resource or configuration if it is missing — automatically after a create or update; existing noncompliant resources are fixed through a remediation task |
| Modify | Adds, updates, or removes supported resource properties or tags during creation or update; during an evaluation cycle on existing resources it only marks them noncompliant, so a remediation task is needed to change them |
| Disabled | Turns off the effect for that assignment |
Other effects exist, but these are enough to understand the model. Policy can continuously report existing resources as compliant or noncompliant. A Deny policy prevents a disallowed new configuration; an Audit policy may be chosen when an organization wants visibility before enforcement.
Examples of policies
- Allow virtual machines only in approved Azure regions
- Require a
CostCentertag on resource groups or resources - Restrict virtual machines to approved SKU sizes
- Require encryption or diagnostic settings
- Audit public network access on selected services
Policy does not ask whether Maria is an Owner or Contributor. It asks whether the requested resource configuration follows the organization’s rules.
The same request through both systems
Imagine Sam has Contributor access to a production resource group. Sam tries to create a large virtual machine in an unapproved region.
RBAC evaluates Sam’s assignment: Contributor includes permission to create virtual machines at that scope, so RBAC allows the action. Azure Policy then evaluates the request: the region and SKU violate an assigned policy with a Deny effect, so the deployment is blocked.
If Lee has only Reader access, a policy-compliant request still fails because RBAC grants no create permission.
That comparison is the exam key: passing one system does not bypass the other.
When to use which control
Use RBAC to apply least privilege to people and workloads:
- Give a support team Reader access instead of Contributor.
- Give an application’s managed identity only the actions it needs.
- Restrict who can assign roles by limiting Owner and User Access Administrator.
Use Azure Policy to enforce organizational standards at scale:
- Prevent resources in disallowed locations.
- Require tags for cost tracking.
- Control expensive or risky configurations.
- Report compliance across many subscriptions.
Use both when an action must be authorized and well configured — for example, Contributors are still blocked from unapproved regions by Policy.
Common troubleshooting pattern
If a deployment fails, read the error carefully. An authorization error usually names the missing action and scope: RBAC is the problem. A policy error names the policy assignment or definition that denied the resource: Policy is the problem.
Do not fix every failure with Owner: it grants excess authority and still cannot override a Deny policy. A compliant resource also does not help a user who lacks deployment permission.
On the exam
For AZ-104, expect scenario questions asking which Azure feature meets a requirement:
- “Only the networking team may manage virtual networks” → RBAC role assignment
- “Virtual machines may be created only in Canada Central” → Azure Policy
- “All resources must have a department tag” → Azure Policy
- “A user needs to view resources but not modify them” → Reader role
- “A user must manage resources but cannot assign access” → Contributor
Also remember scope inheritance for RBAC and that initiatives are groups of policy definitions.
Practical takeaway
Before changing anything, ask two questions: Does this identity have permission to act? and Is the requested configuration allowed? If the first answer is no, fix RBAC. If the second is no, fix Policy or the resource request.
FAQ
Can Azure Policy grant a user access to a resource? No. Policy evaluates resource compliance and configuration. RBAC role assignments grant access.
Does Owner override Azure Policy? No. Even a highly privileged user can be blocked by a Policy assignment with a Deny effect if the requested resource violates the rule.
What is a policy initiative? An initiative is a collection of Azure Policy definitions grouped and assigned together, such as a set of rules for a security baseline or regulatory standard.
Ready to prove it?
Reading about RBAC and Policy is a start. CertCrack practice exams for AZ-900 and AZ-104 test you the way the real exam does — with explanations for every answer.
Try a Free Sample Quiz