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 delegated scopes and/or application permissions such as: Application.ReadWrite.All, Directory.ReadWrite.All, Application.ReadWrite.OwnedBy and/or directory roles such as Application Administrator, Cloud Application Administrator, Privileged Role 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)

Azure GUI

1

Application owners who can add client secrets

  • Go to Microsoft Entra admin centerApp registrations → select the target app.

  • Open Owners and list all identities shown there.

  • Review Certificates & secrets exposure and ownership model.

2

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

    • Directory.ReadWrite.All

    • Application.ReadWrite.OwnedBy

3

Directory roles whose members can add secrets

  • Go to Roles & administrators.

  • Review memberships for:

    • Global Administrator

    • Privileged Role Administrator

    • Application Administrator

    • Cloud Application Administrator

  • If any role assignment is a group, enumerate transitive membership.


Exploitation

PowerShell (Microsoft Graph)

Azure GUI

  • Go to Microsoft Entra admin centerApp registrations (or Enterprise applications).

  • Open the target object.

  • Go to Certificates & secrets.

  • Under Client secrets, create a new secret through your approved workflow.

  • Copy the secret immediately and store it securely.


Mitigation

  • Minimize Owners on applications and service principals.

  • Remove unnecessary Graph permissions from service principals:

    • Prioritize removing Directory.ReadWrite.All and 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 (JIT / PIM where available).

  • Require change management for credential changes on production identities.


Detection

Use Entra Audit logs to see who added a new client secret.

  • Go to Microsoft Entra admin centerAudit logs.

  • Use Category that corresponds to Application management.

  • Look for events related to credentials, such as:

    • Update application – Certificates and secrets management

  • Open the event and review:

    • Initiated by

    • Target resources

    • Any modified properties related to password credentials


References

Last updated

Was this helpful?