At first glance, the Azure environment looked clean.
No unnecessary Global Administrators.
No obvious subscription Owners scattered across the organization.
MFA was enforced.
Privileged Identity Management was being used for elevated human access.
Nothing immediately stood out.
Then we found a user who could effectively operate with permissions far beyond the scope of their assigned Azure role.
The interesting part?
The user had never been assigned those permissions.
The privilege escalation existed because of something we weren’t initially looking at:
A managed identity attached to a resource the user could control.
That changed the way we looked at Azure permissions entirely.
Note: The scenario in this article is a composite example based on common Azure permission patterns. It does not describe a specific customer security incident.
The Environment Looked Secure
Imagine a fairly typical Azure configuration.
An engineering team manages a resource group:
rg-platform-ops
Members of the team have the Contributor role on that resource group.
That seems reasonable.
They need to:
- Modify resources
- Deploy applications
- Update configuration
- Manage automation
- Troubleshoot production issues
Their permissions are limited to that resource group.
They are not Contributors at the subscription level.
They are not Owners.
They cannot create Azure RBAC role assignments.
From a traditional RBAC review, everything looks fine.
But inside the resource group is an Azure Automation Account.
And that Automation Account has a system-assigned managed identity.
That identity has:
Contributor access at the subscription level.
Now the security model looks very different.
The Permission We Missed
The engineer did not have subscription-level Contributor access.
But they could modify the Automation Account.
The Automation Account’s managed identity did have subscription-level Contributor access.
That creates an indirect path:
Engineer
↓
Contributor on Resource Group
↓
Can modify Automation Account
↓
Automation Account runs using Managed Identity
↓
Managed Identity has Contributor on Subscription
↓
Engineer can potentially perform actions across the Subscription
That is privilege escalation.
The user’s Azure role never changed.
No one added the user to a privileged group.
No Global Administrator role was activated.
No subscription-level Contributor role was assigned to the user.
Yet the effective access path changed dramatically.
The Real Problem: We Were Reviewing Identities Individually
This was the mistake.
When reviewing privileged access, it is easy to ask:
“Who has Owner?”
Then:
“Who has Contributor?”
Then:
“Who has Global Administrator?”
Then maybe:
“Which users have permanent privileged roles instead of PIM?”
Those are all important questions.
But they are not enough.
Azure permissions do not exist in isolation.
Resources have identities.
Applications have identities.
Automation Accounts have identities.
Virtual machines can have identities.
Function Apps can have identities.
Logic Apps can have identities.
Service principals have permissions.
And humans may have the ability to modify those resources even when they do not directly control the identity itself.
That means the real question is not simply:
What permissions does this user have?
It is:
What can this user control that has permissions greater than their own?
That is a much more important question.
Why Managed Identities Make This Easy to Miss
Managed identities are one of the best features in Azure.
They eliminate the need to store passwords, secrets, and credentials inside applications.
Instead, an Azure resource receives an identity that can authenticate directly to other Azure services.
That dramatically improves credential management.
But managed identities are still identities.
And identities have permissions.
If an Automation Account has Contributor access across a subscription, that permission exists regardless of whether a human user ever logs in as that identity.
The workload simply authenticates using its managed identity.
Now consider what happens when another user can modify the code executed by that workload.
The user’s practical permissions may become much larger than the RBAC assignment shown next to their name.
This is why managed identities should receive only the permissions they actually require.
Broad managed-identity permissions increase the potential blast radius when the resource using that identity is compromised or controlled by someone who should not have those privileges.
Why MFA Wouldn’t Have Stopped This
This is another important distinction.
MFA is critical for protecting user identities.
But the managed identity in this scenario does not authenticate like a normal user.
There is no username and password.
There is no interactive login.
There is no MFA prompt.
The Azure resource requests a token using its managed identity.
So you could have excellent MFA enforcement across your human users and still have this attack path sitting inside the environment.
That does not mean MFA failed.
It means the risk exists somewhere MFA was never designed to protect.
Why PIM Wouldn’t Necessarily Have Stopped It Either
Privileged Identity Management is another powerful security control.
Instead of permanently assigning someone a powerful role, PIM can make the user eligible for the role.
The user activates it when needed.
You can require:
- MFA
- Approval
- Justification
- Limited activation duration
- Notifications
- Access reviews
That dramatically reduces standing human privilege.
But there is another category of standing privilege:
Workload identities.
If a managed identity permanently has broad permissions at the subscription level, those permissions may be available 24/7.
The human user might be tightly controlled through PIM while the workload identity quietly retains permanent elevated access.
That is why privileged-access reviews need to include more than users.
They should include:
- Users
- Groups
- Service principals
- Managed identities
- Automation identities
- Application identities
Human privilege is only part of the Azure attack surface.
The Two Permissions You Need to Compare
A better Azure privilege review compares two things.
1. What can the identity access?
For every privileged managed identity or service principal, determine:
- What role does it have?
- At what scope?
- Is that scope necessary?
- Is the assignment permanent?
- What resources can it modify?
- Can the permission be narrowed?
Then ask the second question.
2. Who can control the resource using that identity?
If a powerful managed identity belongs to an Automation Account, Function App, Logic App, VM, or other resource, determine who can modify that resource.
That relationship is critical.
You may discover situations where:
Low-privileged identity → Controls resource → Resource uses high-privileged identity
That relationship is often much more dangerous than the individual role assignments suggest.
Scope Matters More Than Most Teams Realize
Azure RBAC permissions can exist at several scopes:
Management Group
↓
Subscription
↓
Resource Group
↓
Resource
Permissions assigned higher in that hierarchy are inherited by resources below them.
That is why a broad assignment can have such a large blast radius.
A managed identity might only need access to one storage account.
But if someone assigned it Contributor at the subscription level because it was easier during deployment, the identity now carries permissions far beyond what the application actually requires.
This tends to happen gradually.
A deployment fails.
Someone temporarily adds Contributor.
The deployment works.
The permission is never revisited.
Six months later, nobody remembers why the identity has subscription-wide access.
The configuration becomes normal.
Until someone examines the entire permission path.
What We Should Have Been Looking For
The lesson was simple:
Don’t audit role assignments. Audit access paths.
Instead of stopping after identifying privileged users, look for relationships between identities and resources.
Start with questions like:
- Which managed identities have subscription-level roles?
- Which service principals have broad Azure RBAC permissions?
- Which identities have Owner, Contributor, User Access Administrator, Role Based Access Control Administrator, or other powerful roles?
- Who can modify the resources associated with those identities?
- Which applications or automation systems execute using privileged identities?
- Are any user-assigned managed identities shared across multiple resources?
- Are privileged permissions assigned at a broader scope than necessary?
- Are old automation identities still active?
- Are permissions still required for the workload’s current function?
That creates a very different picture of the environment.
One Query Every Azure Team Should Be Watching
Azure RBAC role changes are recorded in the Azure Activity Log.
If those logs are available in Log Analytics, you can monitor role-assignment activity using KQL.
AzureActivity
| where OperationNameValue in (
"Microsoft.Authorization/roleAssignments/write",
"Microsoft.Authorization/roleAssignments/delete"
)
| project
TimeGenerated,
Caller,
OperationNameValue,
ActivityStatusValue,
ResourceGroup,
ResourceId,
SubscriptionId
| order by TimeGenerated desc
This gives you visibility into role assignments being created or removed.
But there is an important limitation.
A privilege-escalation path may already exist without any new RBAC assignment occurring.
That was the key lesson from this scenario.
The risky relationship might have been created months ago.
The user is simply discovering how to use permissions that already exist.
Monitoring changes is important.
Understanding existing relationships is equally important.
How We Would Fix This
The immediate remediation would not be complicated.
Reduce the managed identity’s scope
If the Automation Account only needs to modify a handful of resources, it should not have Contributor across the entire subscription.
Assign the smallest role at the smallest scope that allows the automation to function.
For example:
Instead of:
Contributor → Subscription
Use:
Specific required role → Specific Resource or Resource Group
The exact role depends on what the automation needs to perform.
Review who can modify privileged workloads
A highly privileged managed identity attached to a resource effectively makes that resource security-sensitive.
Access to modify it should be treated accordingly.
Review who can:
- Modify runbooks
- Change Function App code
- Modify Logic Apps
- Deploy VM extensions or scripts
- Change application configuration
- Assign user-managed identities
- Modify automation jobs
The identity may be secure.
The resource using the identity may not be.
Remove unnecessary standing privilege
If a managed identity no longer requires broad permissions, remove them.
Do not allow permissions to survive simply because they were required by an older architecture.
Cloud environments change quickly.
Permissions frequently do not.
Review privileged identities regularly
Privileged-access reviews should include both humans and workloads.
At minimum, inventory:
- Subscription Owners
- User Access Administrators
- Role Based Access Control Administrators
- Broad Contributors
- Privileged service principals
- Privileged managed identities
Then determine whether each assignment still has a legitimate operational requirement.
The Bigger Lesson
The biggest lesson wasn’t that Azure RBAC was configured incorrectly.
The individual role assignments made sense when viewed independently.
The problem appeared when we connected them.
A user controlled a resource.
The resource controlled an identity.
The identity controlled resources across a much larger scope.
None of those relationships alone looked catastrophic.
Together, they created a privilege-escalation path.
That is how cloud security problems often happen.
Not because one permission is obviously dangerous.
But because several reasonable permissions combine into something nobody intended.
Think in Attack Paths, Not Lists
Security teams often think in lists:
Users.
Roles.
Groups.
Applications.
Service principals.
Managed identities.
Resources.
But attackers do not think in lists.
They think in paths.
What can I access?
What can I control from there?
What identity does that resource use?
What can that identity access?
That mindset is incredibly useful for defenders too.
Instead of asking:
“Does this user have excessive permissions?”
Start asking:
“Is there a path from this identity to something more privileged?”
That single question can uncover risks traditional access reviews completely miss.
Final Thoughts
The dangerous part of this Azure privilege-escalation path wasn’t an obvious Global Administrator account.
It wasn’t a compromised subscription Owner.
It wasn’t someone bypassing MFA.
It was a chain of legitimate permissions.
A user legitimately had Contributor access to a resource group.
An Automation Account legitimately used a managed identity.
The managed identity legitimately had permissions it had been given at some point in the past.
But when those permissions were connected together, the effective access was much broader than intended.
That is the lesson:
In Azure, your effective privilege is not always the role assigned to your account.
Sometimes it is the privilege of the resources you are allowed to control.
And those relationships are exactly where defenders need to start looking.
Where AzureWise Fits
This is why we built the AzureWise Identity Security Assessment around visibility into identity and privileged-access signals.
Azure identity data is spread across multiple places:
- Microsoft Entra ID
- Azure RBAC
- Sign-in logs
- Audit logs
- Service principal activity
- Privileged role changes
- Azure Monitor
The goal is to make those signals easier to investigate and prioritize instead of waiting for an alert after something has already happened.
Because sometimes the highest-risk permission in your environment isn’t the one that jumps out in the portal.
It’s the connection between permissions that nobody thought to look for.
Want the Azure identity assessment already built?
AzureWise Identity Security Assessment turns Microsoft Entra ID telemetry into a weighted Security Rating, detailed findings, and prioritized remediation guidance inside Azure Monitor.
Get AzureWise — $99