Recommend a Solution for Authorizing Access to Azure Resources — Lesson
AZ-305 › Unit 1 › Design authentication and authorization solutions › Recommend a solution for authorizing access to Azure resources
Recommend a Solution for Authorizing Access to Azure Resources
Authentication establishes who or what is making a request. Authorization decides what that identity may do, to which resource, and under which conditions. AZ-305 scenarios often blur those two decisions: a user signs in successfully through Microsoft Entra ID but receives 403 Forbidden from Azure Resource Manager or from a storage data endpoint. The architect must then select the correct authorization control rather than adding another authentication factor.
This lesson builds a repeatable design method around Azure role-based access control (Azure RBAC), role assignment scope, Azure attribute-based access control (Azure ABAC) conditions, managed identities, and Microsoft Entra Privileged Identity Management (PIM). The goal is not to memorize every built-in role. It is to translate business duties into the smallest durable permission boundary and to explain why nearby controls—Azure Policy, resource locks, Conditional Access, and network rules—solve different problems.
Objective at a glance
- Azure RBAC
- Management group → resource
- Azure ABAC conditions
- PIM eligible assignments
Learning objectives
After this lesson, you should be able to:
- Separate authentication, authorization, governance, and network-access requirements.
- Construct an Azure RBAC role assignment from a security principal, role definition, and scope.
- Choose a built-in role before designing a custom role, and distinguish control-plane
Actionsfrom data-planeDataActions. - Select the narrowest practical scope while accounting for inheritance and operational scale.
- Add ABAC conditions only when a supported attribute-based restriction is required.
- Use PIM for just-in-time administrative access and managed identities for workload authorization.
- Validate the effective-access path and diagnose common
403failures.
The decision frame: identify the control plane
An architecture question usually contains several security requirements. Classify each before choosing a product.
Controls that are often confused
| Attribute | Recommended | |||
|---|---|---|---|---|
| Primary question | May this principal perform this Azure resource action? | May this principal administer an Entra directory object? | Is this resource configuration allowed or compliant? | Can this traffic reach the endpoint? |
| Example | Read blobs in one container | Reset a user's password | Require private endpoints on storage accounts | Allow a subnet through a firewall |
| Typical failure | 403 authorization failure | Directory operation denied | Deployment denied or marked noncompliant | Timeout, refused connection, or DNS failure |
| Design output | Role assignment | Directory role assignment | Policy assignment or initiative | NSG, firewall, private endpoint, route |
Conditional Access also belongs to the authentication/session side: it evaluates signals such as user risk, device state, location, and requested application before issuing or maintaining access. A resource lock prevents deletion or modification even by otherwise authorized principals, but it is not a replacement for least-privilege roles. Azure Policy evaluates resource state and deployment operations; it does not grant a user permission to read or update a resource.
Azure RBAC: principal, role, and scope
Azure RBAC is Azure Resource Manager's authorization system. A role assignment joins three elements:
- Security principal—the who. A user, group, service principal, or managed identity.
- Role definition—the allowed operations. Usually a built-in role; sometimes a custom JSON definition.
- Scope—the where. Management group, subscription, resource group, or individual resource.
The assignment applies at its scope and inherits down the resource hierarchy. A group assigned Reader at a subscription can read resource groups and resources in that subscription. An additional narrow role at one resource adds permissions; RBAC permissions are generally additive. Deny assignments can override allowed actions, but normal administrators do not author arbitrary deny assignments as a substitute for role design.
Text equivalent: select the principal type, prefer a built-in role, select scope, add a supported condition only when needed, make privileged human access eligible, and validate effective permissions.
Control-plane and data-plane permissions
A role definition can carry two permission families:
ActionsandNotActionsdescribe Azure Resource Manager operations, such as reading a storage account configuration or restarting a virtual machine.DataActionsandNotDataActionsdescribe operations against data inside a service, such as reading blob contents or secrets.
This distinction explains a classic failure: Reader can view a storage account in the portal but cannot read blob data. Contributor can configure the account but does not automatically receive every data-plane permission. Add a data role such as Storage Blob Data Reader when the duty is to read blobs. For Key Vault, use the service's RBAC data roles when the vault is configured for Azure RBAC; a control-plane contributor should not automatically read secrets.
Built-in roles before custom roles
Built-in roles receive Microsoft-maintained updates and make audits easier. Begin with a task-specific built-in role. Use a custom role when no built-in role expresses the required operation set without material excess privilege.
A custom role includes allowed and excluded management and data actions plus AssignableScopes. NotActions is not a deny rule; it subtracts actions from that role definition. Another role assignment may still grant the same operation. Keep custom roles stable and duty-oriented—Network Peering Operator is more maintainable than a role named after one employee or project sprint.
{
"Name": "Network Peering Operator",
"IsCustom": true,
"Description": "Manage virtual network peerings without changing address spaces.",
"Actions": [
"Microsoft.Network/virtualNetworks/read",
"Microsoft.Network/virtualNetworks/virtualNetworkPeerings/*"
],
"NotActions": [],
"DataActions": [],
"NotDataActions": [],
"AssignableScopes": ["/subscriptions/00000000-0000-0000-0000-000000000000"]
}Scope and inheritance
The narrowest possible scope is not always the narrowest practical scope. Assigning the same role separately to 800 resources creates drift and consumes role assignments. A resource-group assignment can be safer when all resources share one lifecycle and duty boundary. A subscription assignment may be appropriate for a central monitoring team that must read every current and future resource, but it is too broad for an application operator responsible for one workload.
Use groups for human access. Assigning roles directly to dozens of users increases review effort and makes joiner/mover/leaver processes fragile. Put users in a duty-based group, assign the group once, and govern membership. For applications, assign the managed identity rather than a developer's account or a long-lived client secret.
Design a least-privilege assignment
State the duty
List the exact control-plane and data-plane operations needed. Separate read, operate, deploy, and grant-access duties.
Deterministic infrastructure as code
Role assignments should be reproducible. In Bicep, generate a deterministic assignment name from the scope, principal, and role. Deploying the same template should converge on the same row rather than create duplicates.
param principalId string
resource storage 'Microsoft.Storage/storageAccounts@2023-05-01' existing = {
name: 'staz305prod'
}
var blobReaderRole = subscriptionResourceId(
'Microsoft.Authorization/roleDefinitions',
'2a2b9908-6ea1-4ae2-8e65-a410df84e7d1'
)
resource blobReader 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(storage.id, principalId, blobReaderRole)
scope: storage
properties: {
principalId: principalId
principalType: 'ServicePrincipal'
roleDefinitionId: blobReaderRole
}
}New identities and role assignments can take time to propagate. Supplying principalType helps deployment behavior for newly created service principals. A retryable validation step is safer than assuming an immediate data-plane request will succeed.
ABAC conditions: narrow an assignment with attributes
Azure ABAC extends Azure RBAC with role assignment conditions. A condition evaluates supported attributes from the principal, resource, request, or environment and filters permissions granted by the assignment. It does not create an explicit deny, and it cannot turn an unrelated role into a universal policy language.
The most mature scenarios concern Azure Storage blob and queue data actions. For example, a broad storage data role can be limited to blobs with a particular index tag or to a path/container constraint. Current Microsoft documentation must control which actions and attributes are supported; do not assume every Azure service accepts RBAC conditions.
Use ABAC when a stable business attribute can replace many near-identical assignments. Do not use it when a few clear resource-group scopes are simpler, when the service/action is unsupported, or when tags are not governed reliably.
PIM: remove standing administrator access
PIM for Azure resources can make an assignment eligible rather than permanently active. The user activates it when needed, subject to controls such as MFA, justification, approval, activation duration, and notification. The resulting access is time-bounded and auditable.
Use eligible assignments for human administrative duties such as subscription ownership or access administration. Do not put workload identities through a human activation flow. Workloads require durable runtime authorization, normally through managed identity and a narrowly scoped role.
PIM and ABAC can be combined: PIM controls when the privileged assignment becomes active; an RBAC condition controls which supported resources or data it can reach while active.
Managed identities and workload authorization
A system-assigned managed identity shares the lifecycle of one Azure resource. A user-assigned managed identity is a separate resource that can be attached to multiple workloads and survive their replacement. Choose system-assigned identity for simple one-resource ownership. Choose user-assigned identity when several resources require the same identity, when preauthorization must exist before compute deployment, or when workload replacement must preserve identity.
Managed identity removes application-managed credentials, but it does not grant access by itself. The identity still needs an RBAC assignment on the target resource. The application obtains a token for the target resource and the service evaluates that identity's permissions.
Worked scenario: platform operations without permanent ownership
Contoso has 40 subscriptions under a Production management group. A central platform team must restart virtual machines and view monitoring data in every production subscription. Only two security leads may grant access, and they should have that capability for at most one hour after approval. A deployment service writes artifacts to one storage container. It must not receive storage-account management access.
Recommended design:
- Create
Platform-VM-Operatorsand assign task-specific VM operation and monitoring roles at theProductionmanagement-group scope. The assignment inherits to current and future subscriptions. - Avoid
Contributorif the task roles cover restart and monitoring duties. Do not assignOwnermerely for convenience. - Make the two security leads eligible for
User Access Administratoror the least-privileged access-management role through PIM, with approval, MFA, justification, and a one-hour duration. - Give the deployment service a managed identity and assign
Storage Blob Data Contributorat the target container scope. Do not use a storage account key and do not grant storage accountContributorfor data writes. - If the container contains several governed data classes and the supported attributes express the rule, add an RBAC condition. Otherwise split the scope into separate containers.
Fabrikam regulated storage authorization
Question 1 of 2
Which change removes standing auditor privilege while preserving governed access?
Question 2 of 2
How should the Function be authorized?
Troubleshooting effective access
When a valid identity receives 403, walk the evaluation path:
- Confirm the token represents the expected tenant, principal, and audience.
- Identify whether the denied operation is control plane or data plane.
- List direct and group role assignments at the resource and every ancestor scope.
- Inspect
Actions/DataActions, exclusions, and conditions for the requested operation. - Confirm a PIM-eligible role was activated and has not expired.
- Look for deny assignments and service-specific authorization modes.
- Account for propagation delay, token caching, and stale group membership.
- Check network access separately if the result is a timeout rather than an authorization response.
Common exam traps
- Contributor can manage access. False. Contributor manages resources but cannot generally create role assignments.
- Reader can read service data. Not necessarily. Reader is primarily a control-plane role.
NotActionsis a deny. False. It subtracts permissions from one role definition.- Policy grants authorization. False. Policy governs resource configuration and compliance.
- A managed identity automatically has permissions. False. It supplies an identity; RBAC supplies authorization.
- ABAC works identically across every Azure service. False. Verify supported actions and attributes.
- PIM is for application runtime access. False. It is primarily for governed human privilege activation.
- The resource scope is always best. Not if it produces hundreds of fragile assignments; use the narrowest durable boundary.
Retrieval checkpoint
Summary
Design Azure resource authorization by translating a duty into principal, allowed operations, scope, and optional conditions. Prefer groups for people, managed identities for workloads, built-in roles for common duties, and the narrowest maintainable scope. Distinguish management operations from data access, use PIM to remove standing human privilege, and use ABAC only for supported attribute-based restrictions. Validate the complete effective-access path rather than treating every security failure as an authentication problem.
Sources and freshness
Reviewed 2026-08-02. Scope follows the April 17, 2026 AZ-305 study guide. Current behavior is grounded in Microsoft's Azure RBAC documentation, Azure ABAC conditions overview, managed identities overview, and PIM for Azure resource roles. The attached Exam Ref supplies historical teaching context; current Microsoft documentation controls supported features and limits.