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.
In this repository273 other files it gives its agents.
- ad-attack-path-analysisSkill
- adcs-security-reviewSkill
- ad-privileged-access-reviewSkill
- dcsync-detectionSkill
- gpo-security-reviewSkill
- kerberos-attack-detectionSkill
- agent-tool-permission-reviewSkill
- ai-incident-responseSkill
- llm-gateway-controlsSkill
- llm-security-evaluationSkill
- mcp-server-security-reviewSkill
- model-artifact-securitySkill
- prompt-injection-reviewSkill
- rag-security-reviewSkill
- api-abuse-detectionSkill
- api-authorization-testingSkill
- api-inventorySkill
- api-schema-securitySkill
- dast-baselineSkill
- sast-triageSkill
- sca-dependency-riskSkill
- secure-code-reviewSkill
- security-requirementsSkill
- threat-modelingSkill
- asset-criticality-tieringSkill
- asset-inventory-reconciliationSkill
- external-attack-surface-reviewSkill
- shadow-it-discoverySkill
- aws-credential-compromiseSkill
- aws-iam-reviewSkill
- aws-org-guardrailsSkill
- cloudtrail-investigationSkill
- guardduty-triageSkill
- s3-exposure-reviewSkill
- azure-activity-investigationSkill
- conditional-access-reviewSkill
- entra-audit-investigationSkill
- entra-signin-investigationSkill
- backup-assuranceSkill
- critical-service-mappingSkill
- ransomware-recoverySkill
- recovery-exerciseSkill
- cloud-exposure-reviewSkill
- cloud-incident-responseSkill
- cloud-logging-baselineSkill
- cloud-posture-assessmentSkill
- audit-evidence-packageSkill
- continuous-control-monitoringSkill
- control-mappingSkill
- control-testing-samplingSkill
- container-incidentSkill
- dockerfile-hardeningSkill
- image-scanningSkill
- runtime-detection-falcoSkill
- db-audit-loggingSkill
- db-exfiltration-investigationSkill
- db-hardeningSkill
- db-privilege-reviewSkill
- data-classificationSkill
- data-discoverySkill
- The first 60 shown.
The file
Files
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 (
/) — checkMicrosoft.Authorization/elevateAccess/actionin 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 assignmentsFindings
| Finding | Target state |
| > 5 Global Administrators, or GA used daily | 2–4 GA, cloud-only accounts, PIM-eligible, phishing-resistant MFA, plus 2 break-glass accounts (monitored) |
| Standing Owner/UAA at subscription or MG | PIM eligible with approval |
| Service principals with Owner / directory roles | Least privilege; review app credentials (entra-audit-investigation) |
| Guests with privileged roles | Remove |
Custom roles with * actions or Microsoft.Authorization/*/write | Scope down |
| Synced (on-prem) accounts in privileged roles | Cloud-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
- Azure RBAC best practices: https://learn.microsoft.com/en-us/azure/role-based-access-control/best-practices
- Entra built-in roles: https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference
- Securing privileged access for hybrid and cloud deployments: https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/security-planning
- Elevate access for a Global Administrator: https://learn.microsoft.com/en-us/azure/role-based-access-control/elevate-access-global-admin
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
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.

