AZ_MG_ADD_SECRET

Summary

FSProtect ACL Alias

AZ_MG_ADD_SECRET

Entra ID (Azure AD) Alias

Add Secrets (Microsoft Graph)

Affected Object Types

App registrations & Service Principals

Exploitation Certainty

Certain

Graph Permission / Role

Ability to add password credentials via Microsoft Graph using application permission Application.ReadWrite.All and/or directory roles such as Application Administrator, Cloud Application Administrator, Global Administrator or explicit Owner on the Application / Service Principal

Description

AZ_MG_ADD_SECRET represents the ability for a principal to add a new client secret / password credential via Microsoft Graph to an App Registration (application) or a Service Principal.

Adding a secret gives an attacker or a controlled identity the ability to:

  • Exchange the application’s client id + secret for tokens and act as that application, using any privileges granted to the app (delegated or application permissions).

  • If the application has broad application permissions, the attacker can perform tenant-wide actions or escalate further.

  • If the service principal represents infrastructure, cloud resources, or privileged automation, the new secret may be used to access production systems or pivot laterally.

Because secrets are persistent credentials that can be used from anywhere, the ability to add secrets is highly sensitive.

Identification

PowerShell (Microsoft Graph)

Enumerate service principals that have Microsoft Graph application permissions capable of adding secrets.

Azure GUI

  1. Enterprise applications (service principals) that can add secrets via Graph

    • Go to Enterprise applications -> select the application (service principal).

    • Open Permissions / API permissions.

    • Under Microsoft Graph -> review Application permissions for:

      • Application.ReadWrite.All

Note: For identification of directory roles (Application Administrator, Cloud Application Administrator, Global Administrator) and explicit owners that can add secrets, see AZ_ADD_SECRETarrow-up-right.

Exploitation

An attacker with Application.ReadWrite.All permission or ownership of an application can add a client secret and then authenticate as that application to abuse its permissions.

PowerShell (Microsoft Graph)

Azure GUI

  • Go to Microsoft Entra admin center -> App registrations (or Enterprise applications).

  • Open the target object.

  • Go to Certificates & secrets.

  • Under Client secrets, create a new secret.

  • Copy the secret immediately and store it securely.

Mitigation

  • Minimize owners on applications and service principals.

  • Remove unnecessary Graph permissions from service principals:

    • Review and remove Application.ReadWrite.All when not required.

    • Prefer least-privilege patterns and narrow ownership boundaries.

  • Configure Application management policies to restrict credential operations:

    • Restrict or block password credential additions where possible.

    • Enforce maximum secret lifetimes.

    • Control exceptions with explicit scoping and approvals.

  • Use privileged access controls for admin roles (PIM where available).

  • Require change management for credential changes on production identities.

  • Regular access reviews:

    • Go to Identity Governance -> Access Reviews.

    • Review application owners and service principals with privileged permissions.

Detection

Monitor Entra Audit logs for secret additions.

  • Go to Microsoft Entra admin center -> Audit logs.

  • Filter by Category: ApplicationManagement.

  • Look for events:

    • Update application - Certificates and secrets management

    • Add service principal credentials

  • Review:

    • Initiated by (actor)

    • Target resources

    • Modified properties related to password credentials

Alert on:

  • Secret additions to applications with privileged Graph permissions.

  • Secret additions outside of change management windows.

  • Secret additions by unexpected actors.

References

Last updated

Was this helpful?