Microsoft Azure Learning Journey

Access Denied? Understand Microsoft Entra ID and Azure RBAC

Authentication proves who or what is signing in. Authorization decides what that identity can do, and where.

16 min read · 3104 words
Microsoft AzureMicrosoft Entra IDAzure RBACCloud SecurityDevOps
Access Denied? Understand Microsoft Entra ID and Azure RBAC cover image

You can open a virtual machine in the Azure portal, but a script running on it cannot read a blob. A teammate can sign in to Microsoft Entra ID, but cannot create a resource group. Someone else can create resources, but cannot grant a colleague access.

These are not necessarily contradictory permissions. Azure separates identity, resource management, and access to service data. Knowing which system made the decision is the first step to fixing “Access denied” without handing out broad permissions.

This article introduces Microsoft Entra ID and Azure role-based access control (Azure RBAC), then uses read-only Azure CLI commands to inspect the subscription context and its role assignments. The exercise creates no Azure resources and changes no permissions.

What you’ll learn

Where this fits

This is Module 5 and Phase 2, Part 1. Phase 1 covered tenants, subscriptions, and resource groups. This article uses those boundaries to explain access. Next, Beyond Contributor: Design Least-Privilege Azure Access goes deeper into custom roles, privileged administration, access reviews, and constrained delegation.

Prerequisites

Do not use a production subscription for experimentation. The commands below are read-only, but assignment output can reveal sensitive names and access patterns; do not paste it into a public issue or commit it to source control.


Identity answers “who”; authorization answers “what can they do?”

Authentication verifies an identity. For a person, this may involve a password, multifactor authentication, or a passkey. For a workload, it may involve a managed identity or a federated token.

Authorization evaluates whether the authenticated identity is allowed to perform a particular operation on a particular resource. A successful sign-in does not automatically grant access to an Azure subscription, and permission to manage a resource does not necessarily grant permission to read its data.

Microsoft Entra ID is the identity provider for Azure. It authenticates users and workloads and issues tokens. Azure services then use those identities and their permissions to make access decisions.

The identity objects you will encounter

For example, an app registration is like an application’s identity blueprint. Its service principal is the instance that exists in a tenant and can be assigned permissions there. A managed identity is a service principal provisioned and operated by Azure for a workload, so your code does not need to store a client secret. Module 7 covers federated workload identity; Module 8 covers managed identities and Key Vault in more detail.

Two role systems, two different jobs

Microsoft Entra roles administer the directory

Microsoft Entra roles authorize administrative tasks in the identity directory. They govern actions such as managing users, groups, or application registrations. Their scope is the tenant or a supported administrative unit.

Examples include User Administrator and Application Administrator. An Entra role is not the same as an Azure resource role, even if the names sound similar.

Azure RBAC governs access to Azure resources

Azure RBAC is Azure Resource Manager’s authorization system for Azure resources. It controls management operations such as viewing, creating, updating, and deleting resources. Some Azure roles also grant data access through explicit data actions.

An Azure RBAC assignment has three parts:

  1. Security principal — who: a user, group, service principal, or managed identity.
  2. Role definition — what: a built-in or custom collection of allowed operations.
  3. Scope — where: the management group, subscription, resource group, or individual resource to which the role applies.
Security principal  +  Role definition  +  Scope
       who                 what             where
                         |
                         v
                  Role assignment

An assignment is a grant at a scope; it is not a separate identity. Azure evaluates the identity, the requested action, the resource scope, and applicable restrictions when the request arrives.

Common Azure roles are not interchangeable

The role name alone is not enough. Check its definition, scope, and whether the attempted operation is a management action or a data action.

Scope and inheritance: access flows down, not up

Azure RBAC scopes form a hierarchy:

Management group
└── Subscription
    └── Resource group
        └── Resource

A role assignment on a parent scope is inherited by its descendants. A subscription-level assignment can therefore apply to its resource groups and resources. A role assigned to one resource group does not grant access to its parent subscription or sibling resource groups.

Prefer the narrowest scope that lets the person or workload do its job. A resource-specific data-reader assignment is usually safer than subscription-wide Contributor access.

Azure RBAC generally combines applicable grants: overlapping role assignments can add permissions together. Other controls can still limit a request, including deny assignments, role-assignment conditions where supported, service-specific authorization, and network restrictions. An allow on one layer does not guarantee that the operation will succeed through every layer.

Control plane and data plane: a common source of “Access denied”

The control plane manages the Azure resource itself through Azure Resource Manager. Examples include listing a storage account, changing a setting, or creating a virtual machine.

The data plane operates on the contents or capabilities of a service. Examples include downloading a blob, reading a secret value, or querying a database.

Some Azure roles grant control-plane actions, often represented by Actions in a role definition. A role that grants data access can include DataActions. These permissions are evaluated by the service’s data endpoint and are not implied just because a user can view the resource in the portal.

For example:

Some services support both Entra-based data permissions and other authorization mechanisms, such as access keys, service-specific ACLs, or database grants. Prefer Entra-based access when supported, and inspect the service’s own authorization model rather than assuming one Azure role covers everything.

What happens when access is evaluated?

At a high level, an application or person obtains an identity token from Microsoft Entra ID. The request reaches the Azure management endpoint or a service data endpoint. That endpoint evaluates the identity and the permissions relevant to the requested operation and scope. The service can also apply its own authorization and network controls.

Person or workload
        |
        | authenticate
        v
Microsoft Entra ID
        |
        | identity token
        v
Azure Resource Manager or service endpoint
        |
        | evaluate role, scope, and applicable controls
        v
Allowed operation or access denied

Role changes are not always visible to an already-running session immediately. A refreshed token or renewed sign-in may be necessary, and role assignment changes can take time to propagate. Avoid repeatedly adding broader roles while waiting for a change to take effect.

Hands-on: inspect subscription role assignments

This is a read-only exercise. It does not create resources, add role assignments, or test data-plane access. Use an account and subscription you are authorized to inspect.

1. Sign in and select the intended subscription

If you are not already signed in:

az login

List the subscriptions available to the signed-in identity. This query deliberately omits IDs:

az account list \
  --query "[?state=='Enabled'].{Name:name, IsDefault:isDefault}" \
  --output table

Select one of your authorized development subscriptions. Replace the quoted value with its name or ID:

az account set --subscription "<YOUR_DEVELOPMENT_SUBSCRIPTION_NAME_OR_ID>"

Confirm the selected context. Do not publish the output; it contains tenant and subscription identifiers:

az account show \
  --query "{Name:name, State:state, Tenant:tenantId}" \
  --output table

2. Review assignments visible at the subscription

Set the scope from the selected account, then list assignments at that subscription and inherited from its parent scope:

SUBSCRIPTION_ID="$(az account show --query id --output tsv)"
SUBSCRIPTION_SCOPE="/subscriptions/$SUBSCRIPTION_ID"

az role assignment list \
  --scope "$SUBSCRIPTION_SCOPE" \
  --include-inherited \
  --fill-principal-name false \
  --query "[].{Role:roleDefinitionName, PrincipalType:principalType, Scope:scope}" \
  --output table

This displays the role, principal type, and scope. It does not prove that a particular data-plane operation will work, show every possible group membership path, or reveal service-specific permissions. To examine assignments at a resource group, use that resource group’s full resource ID as --scope, and make sure you are authorized to inspect it.

3. Interpret one assignment

Choose an assignment you recognize and answer:

✅ Checkpoint: You can identify a role’s principal, permissions, and scope, and explain whether its grants inherit to the resource you care about. No Azure resource or permission was changed.

Security and least privilege

Cost implications

This exercise has no Azure resource cost. Signing in and listing role assignments does not deploy billable infrastructure.

In real environments, identity administration and governance features can have licensing, configuration, or operational requirements. Check current Microsoft Entra licensing and service documentation before adopting optional capabilities such as Privileged Identity Management or Conditional Access; those topics are covered in the next module.

Troubleshooting “Access denied”

You can sign in but cannot open the subscription

You can see a resource but cannot read its data

The portal shows a role, but the operation still fails

A newly assigned role has no effect yet

You cannot add a role assignment

A workload cannot authenticate as the expected principal

Production-readiness checklist

Cleanup

No Azure resources, role assignments, or identity objects were created or changed. There is nothing to delete. If you changed the active Azure CLI subscription, restore your previous context if needed:

az account set --subscription "<YOUR_PREVIOUS_SUBSCRIPTION_NAME_OR_ID>"

The angle-bracketed value is intentionally a placeholder; replace it with the subscription you used before this exercise. Do not delete shared groups, service principals, managed identities, or role assignments as part of this read-only exercise.

Key takeaways

Quick self-check

  1. An engineer can view a storage account but cannot download a blob. Which permission plane should you investigate?
  2. A role is assigned to a resource group. Does it grant access to the parent subscription?
  3. Does Contributor let a user grant another user an Azure role?
  4. What three elements make up an Azure RBAC assignment?

Answers

  1. The data plane and the storage service’s data authorization model.
  2. No. The assignment applies at that resource group and its descendants, not to its parent.
  3. No. Contributor manages resources but does not grant Azure RBAC assignments.
  4. Security principal, role definition, and scope.

References

What’s next

The next article, Beyond Contributor: Design Least-Privilege Azure Access, explores custom roles, access reviews, privileged administration, role conditions, and cross-tenant access patterns.

Which permission boundary has caused the most confusion for you: directory roles, Azure resource roles, or data access?


Series navigation


Disclaimer: Azure services, roles, interfaces, limits, and licensing change over time. Verify details in the current Microsoft Azure documentation before implementation.

Share this article

LinkedIn post draft