AZ_MG_GROUP_READWRITE_ALL

Summary

FSProtect ACL Alias

AZ_MG_GROUP_READWRITE_ALL

Entra ID (Azure AD) Alias

Group.ReadWrite.All

Affected Object Types

Service Principals, Applications

Exploitation Certainty

Certain

Graph Permission / Role

Application Permission: Group.ReadWrite.All

Description

AZ_MG_GROUP_READWRITE_ALL represents a Microsoft Graph application permission that grants read and write access to all groups in Microsoft Entra ID (Azure AD). This is a dangerous permission because it allows:

  • Create, read, update, and delete groups including security groups and Microsoft 365 groups

  • Manage group memberships by adding or removing members from any group

  • Read and modify group properties such as display name, description, and visibility

  • Manage group owners by adding or removing owners

  • Create and manage dynamic membership rules for dynamic groups

  • Manage group settings including expiration policies and naming conventions

This permission is often abused for:

  • Privilege escalation: Adding attacker-controlled accounts to privileged groups (e.g., groups with Azure RBAC roles or role-assignable groups with directory roles)

  • Persistence: Creating hidden or innocuously named groups with elevated permissions

  • Lateral movement: Adding accounts to groups that have access to Azure resources, applications, or SharePoint sites

  • Defense evasion: Removing security team members from monitoring groups or modifying group-based Conditional Access policies

circle-info

Important: This is an application permission that requires admin consent and is granted to service principals, not individual users. Once granted, the service principal can perform these actions without additional user context.

circle-exclamation

Identification

PowerShell

Find Service Principals with Group.ReadWrite.All

Exploitation

An attacker with access to a service principal that has Group.ReadWrite.All can perform privilege escalation by manipulating group memberships.

Add User to a Privileged Group

Create a Backdoor Group for Persistence

Mitigation

  • Audit all service principals with Group.ReadWrite.All and remove unnecessary grants.

    • Go to Microsoft Entra ID -> App registrations -> select the application -> API permissions.

    • Remove the Group.ReadWrite.All permission if not required.

  • Apply least privilege: Replace with more specific permissions where possible:

    • Use Group.Read.All if only read access is needed.

    • Use GroupMember.ReadWrite.All if only membership management is needed (without group creation/deletion).

    • Use delegated permissions with user context when appropriate.

  • Protect role-assignable groups:

    • Limit the number of role-assignable groups in your tenant.

    • Enable Privileged Identity Management (PIM) for role-assignable groups.

    • Require approval for adding members to role-assignable groups.

  • Implement Access Reviews for applications with high-privilege permissions:

    • Go to Identity Governance -> Access Reviews -> New access review.

    • Review applications with sensitive Graph permissions regularly.

  • Use Conditional Access to restrict service principal access:

    • Limit the locations and conditions under which service principals can authenticate.

Detection

Detect permission grants and suspicious activity in Audit logs.

  • Go to Microsoft Entra ID -> Audit logs.

  • Filter by activities:

    • Add app role assignment to service principal

    • Add member to group

    • Remove member from group

    • Add group

    • Delete group

    • Add owner to group

    • Remove owner from group

Monitor for suspicious patterns:

  • Membership changes to role-assignable groups by service principals.

  • Bulk group membership modifications.

  • Group creation with suspicious names or descriptions.

  • Membership changes to groups with Azure RBAC permissions.

  • Removal of members from security or monitoring groups.

  • Group modifications outside of change management windows.

References

Last updated

Was this helpful?