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

AZ_ROLE_SCOPED_TO

Summary

Forestall ACL Alias

AZ_ROLE_SCOPED_TO

Entra ID (Azure AD) Alias

Scope

Affected Object Types

App Registrations, Service Principals

Exploitation Certainty

Certain

Graph Permission / Role

Application Administrator, Cloud Application Administrator, or custom Entra ID directory roles with scoped assignments

Description

AZ_ROLE_SCOPED_TO represents the scoping relationship for Entra ID directory role assignments. Roles like Application Administrator and Cloud Application Administrator can be assigned either tenant-wide or scoped to specific objects:

  • Tenant-scoped (/): Control over all app registrations and service principals in the tenant.

  • Object-scoped (/<objectId>): Control over only the specific app registration(s) or service principal(s) designated in the scope.

This distinction is critical for attack path analysis, as tenant-scoped assignments provide significantly broader control than object-scoped ones.

Identification

PowerShell

Enumerate Scoped Role Assignments

Resolve Scoped Target Objects

Azure Portal

View Scoped Role Assignments

  • Open Microsoft Entra admin center -> Roles and administrators.

  • Select a role (e.g., Application Administrator).

  • In the Assignments tab, observe the Scope column:

    • Directory = tenant-wide assignment.

    • A specific object name = scoped to that app registration or service principal.

Exploitation

Related Attack Paths:

  • AZ_APP_ADMIN - Application Administrator role; if tenant-scoped, applies to all apps. If object-scoped, only applies to specific apps.

  • AZ_CLOUD_APP_ADMIN - Cloud Application Administrator role; same scoping behavior as Application Administrator.

  • AZ_ADD_SECRET - Principals with scoped Application/Cloud App Admin roles can add secrets to the scoped app.

  • AZ_ADD_OWNER - Scoped role holders can add owners to the target app/SP.

The abuse potential depends entirely on whether the role is scoped to the tenant or to individual objects:

Scope
Impact
Example

Tenant-wide (/)

Full control over all app registrations and service principals in the tenant

Application Administrator scoped to the directory can add credentials to any app, modify any SP, and escalate via high-privilege apps

Object-scoped (/<objectId>)

Control over only the specific app registration(s) or service principal(s) in scope

Application Administrator scoped to a single app can only add credentials/modify that one app

Mitigation

This is a structural relationship (not directly abusable) indicating role assignment scope. Mitigation:

  • Prefer object-scoped over tenant-wide assignments (least privilege principle).

  • Audit tenant-wide assignments and narrow to specific objects where possible.

  • Regularly review and remove unnecessary assignments.

Detection

Use the Microsoft Entra admin center:

  1. Open Microsoft Entra ID -> Audit logs.

  2. Filter Activity for:

    • Add member to role

    • Add eligible member to role

    • Remove member from role

  3. Review Initiated by (actor), Target, Date, Status, and role scope details for unexpected scoped role changes.

  4. Open Roles & administrators and review the affected role assignment scope.

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

References

Last updated

Was this helpful?