For the complete documentation index, see llms.txt. This page is also available as Markdown.

AZ_MG_APPLICATION_READWRITE_ALL

Summary

Forestall ACL Alias

AZ_MG_APPLICATION_READWRITE_ALL

Entra ID (Azure AD) Alias

Application.ReadWrite.All

Affected Object Types

Service Principals, Applications

Exploitation Certainty

Certain

Graph Permission / Role

Application Permission: Application.ReadWrite.All

Description

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

  • Create, read, update, and delete applications (app registrations)

  • Create, read, update, and delete service principals

  • Add credentials (secrets and certificates) to any application or service principal

  • Modify application permissions and API permissions

  • Change application owners and delegation settings

  • Modify redirect URIs and authentication configurations

  • Read and modify application roles and exposed APIs

This permission is often abused for:

  • Privilege escalation: Adding credentials to applications with high-privilege permissions (e.g., those with Directory.ReadWrite.All)

  • Persistence: Creating backdoor applications with long-lived credentials

  • Credential theft: Adding new secrets to existing privileged service principals

  • OAuth abuse: Modifying redirect URIs to intercept tokens

  • Lateral movement: Compromising applications that have access to other Azure resources

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.

Identification

PowerShell (Microsoft Graph)

Find Service Principals with Application.ReadWrite.All

Exploitation

An attacker with access to a service principal that has Application.ReadWrite.All can perform privilege escalation by adding credentials to high-privilege applications.

Add Credentials to a Privileged Application

Add an application password credential with PowerShell

Add Certificate to Service Principal for Stealthy Persistence

Add an application certificate credential with PowerShell

Mitigation

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

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

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

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

    • Use Application.Read.All if only read access is required.

    • Use Application.ReadWrite.OwnedBy if the application only needs to manage applications it owns.

  • 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.

  • Enable application credential monitoring:

    • Monitor for new credentials being added to applications.

    • Alert on certificate or secret additions to high-privilege applications.

  • Lock down application ownership:

    • Limit who can be an owner of privileged applications.

    • Review application owners regularly.

  • Use Workload Identity Federation where possible instead of secrets/certificates.

Detection

Use the Microsoft Entra admin center:

  1. Open Microsoft Entra ID -> Audit logs.

  2. Filter Activity for:

    • Add app role assignment to service principal

    • Add application

    • Update application - Certificates and secrets management

    • Add service principal credentials

    • Update service principal

  3. Review Initiated by (actor), Target, Date, and Status for unexpected application creation, credential additions, permission changes, or redirect URI changes.

  4. Open the affected App registration or Enterprise application and review Certificates & secrets, API permissions, Owners, and redirect URI settings.

  5. Use Manage view -> Edit columns if any of those fields are hidden.

References

Last updated

Was this helpful?