Who REALLY Has Access to Your Azure Resources?

Introduction

In my previous article about hidden Domain Admins, we explored how management tools can create shadow administrators in your on-premises environment. Today, let’s tackle an equally critical question: Who has access to your Azure resources?

Azure’s hierarchical permission model can create a complex web of access rights that’s hard to untangle. From Management Groups down to individual resources, permissions can be inherited in ways that aren’t immediately obvious.

The Hidden Access Problem

Just like with Domain Admins, the real number of people who can access your Azure resources might surprise you.

Here’s what makes it complicated:

  1. Inheritance: Permissions flow down from Management Groups to Subscriptions to Resource Groups
  2. PIM (Privileged Identity Management): Eligible assignments that aren’t immediately visible
  3. Deleted Identities: Role assignments that persist even after users or service principals are removed
  4. Service Principals: Automated processes with powerful permissions

Introducing the Azure Resource Permissions Analyzer

To help tackle this challenge, I’ve created a PowerShell tool that provides clear visibility into your Azure resource permissions. This tool:

Important Note: This tool is designed to analyze permissions for one resource at a time. While it shows the complete permission picture for a single resource (including all inherited permissions), it’s not meant for bulk scanning of multiple resources. This focused approach allows for detailed analysis of critical resources like Arc-enabled servers, Key Vaults, or Storage Accounts.

  • Shows all direct and inherited permissions for the specified resource
  • Identifies PIM-eligible assignments affecting this resource
  • Detects “ghost” permissions from deleted identities in the resource’s permission chain
  • Creates a beautiful HTML report for easy analysis of the resource’s permission structure

Key Features

  • Visual permission hierarchy
  • Detailed identity information
  • Deleted identity detection
  • Permission statistics
  • Clean, modern HTML report

Using the Tool

				
					<#
  Required Permissions
    To run this tool, you need:
      Reader access at the scope you want to analyze (resource, resource group, subscription, or management group)
      Microsoft.Authorization/roleAssignments/read permission
      Microsoft.Authorization/roleEligibilitySchedules/read permission (for PIM assignments)
      Microsoft.Graph permissions to read service principal details (Application.Read.All)
#>
# Basic usage
Connect-AzAccount
Connect-MgGraph -Scope 'Application.Read.All'

.\Get-AzureResourcePermissions.ps1 -ResourceId "/subscriptions/[SubId]/resourceGroups/[RG]/providers/Microsoft.HybridCompute/machines/[MachineName]"

# Generate both HTML and CSV reports
.\Get-AzureResourcePermissions.ps1 -ResourceId $resourceId -OutputFormat Both
				
			

Understanding the Results

The tool generates a comprehensive report showing:

  1. Total Assignments: All permissions affecting your resource
  2. Direct vs Inherited: Clear separation of direct and inherited permissions
  3. PIM Eligibility: Time-bound privileged access
  4. Deleted Identities: Orphaned permissions that need cleanup

Best Practices for Azure Resource Access

  1. Regular Access Reviews
    • Run this tool regularly
    • Review inherited permissions
    • Clean up deleted identity assignments
  2. Implement Least Privilege
    • Use resource-specific roles instead of broad permissions
    • Leverage PIM for just-in-time access
    • Remove unnecessary inherited permissions
  3. Monitor and Alert
    • Track permission changes
    • Alert on high-privilege assignments
    • Regular compliance checks

The Real Impact

Just like with Domain Admins, the impact of overlooked permissions can be severe:

  • Data breaches through forgotten access paths
  • Compliance violations from unauthorized access
  • Security incidents from compromised accounts

Action Steps

  1. Download and run the tool on your critical resources
  2. Review the HTML report for unexpected access
  3. Clean up identified deleted identities
  4. Implement regular permission audits
  5. Consider PIM for privileged access

Download (Premium Members)

Conclusion

Understanding who has access to your Azure resources is critical for maintaining a secure environment. Don’t wait for an incident to realize you’ve given away more access than you thought.

Download the tool and start analyzing your Azure permissions today. Your security posture will thank you.

Leave a Comment

Contact me

If you’re interested in learning about Who REALLY Has Access to Your Azure Resources?. I can help you understand how this solution can benefit your organization and provide a customized solution tailored to your specific needs.

Table of Contents