agentleFS
kaandgnshkaandgnsh/Claude-Blue/skills/azure-security/azure-rbac-review/SKILL.md

azure-rbac-review

Skill0 starsChanged 15 days agoMITView on GitHub

Review Azure RBAC and Entra directory roles — Owner/Contributor/User Access Administrator assignments at management group, subscription and resource scopes, Global Administrator and privileged directory roles, PIM eligibility vs. standing access, guest and service principal privileges, custom roles with wildcards. Use for Azure access reviews, tenant security assessments, or after suspected privilege escalation.

The file

Files
SKILL.md

Azure RBAC and Entra Role Review

Two separate planes

  • Entra directory roles (tenant): Global Administrator, Privileged Role Administrator, Privileged Authentication Administrator, Application Administrator, Cloud Application Administrator, Exchange/SharePoint Admin, Conditional Access Administrator, Hybrid Identity Administrator.
  • Azure RBAC (resources): Owner, Contributor, User Access Administrator, Role Based Access Control Administrator, plus data roles (Storage Blob Data Owner, Key Vault Administrator).
  • Global Admins can elevate to User Access Administrator at root (/) — check Microsoft.Authorization/elevateAccess/action in Activity Log.

Collect

az role assignment list --all --include-inherited --query "[?roleDefinitionName=='Owner' || roleDefinitionName=='User Access Administrator' || roleDefinitionName=='Contributor'].{principal:principalName,type:principalType,role:roleDefinitionName,scope:scope}" -o table
az role assignment list --scope / --query "[].{p:principalName,r:roleDefinitionName}"    # root scope (needs elevation to view)
az role definition list --custom-role-only true --query "[].{name:roleName,actions:permissions[0].actions}"
Connect-MgGraph -Scopes "RoleManagement.Read.Directory"
Get-MgRoleManagementDirectoryRoleAssignment -All -ExpandProperty Principal | Select-Object RoleDefinitionId, @{n='Principal';e={$_.Principal.AdditionalProperties.userPrincipalName ?? $_.Principal.AdditionalProperties.displayName}}
Get-MgRoleManagementDirectoryRoleEligibilitySchedule -All      # PIM eligible assignments

Findings

FindingTarget state
> 5 Global Administrators, or GA used daily2–4 GA, cloud-only accounts, PIM-eligible, phishing-resistant MFA, plus 2 break-glass accounts (monitored)
Standing Owner/UAA at subscription or MGPIM eligible with approval
Service principals with Owner / directory rolesLeast privilege; review app credentials (entra-audit-investigation)
Guests with privileged rolesRemove
Custom roles with * actions or Microsoft.Authorization/*/writeScope down
Synced (on-prem) accounts in privileged rolesCloud-only admins (on-prem compromise ≠ cloud compromise)
Classic administrators (co-admin)Removed (retired)

Output

Principal | Type | Role | Scope | Standing/eligible | Last used | Justification | Decision

Related skills

privileged-access-review, entra-audit-investigation, conditional-access-review, access-certification

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.