Graph API Role Privilege Escalation PoC

Cloud App Admin โ†’ Global Admin via RoleManagement.ReadWrite.Directory

๐Ÿš€ Quick Start Guide

  1. Get an access token with Cloud App Admin privileges
  2. Enter your access token and tenant ID
  3. Click "Run Exploit" to find vulnerable apps
  4. Use the generated cURL/PowerShell to get an SP token
  5. Enter the SP token and click "Assign Global Admin"
  6. Verify your new Global Admin status

๐Ÿ“ About this PoC

This PoC demonstrates how a user with Cloud App Admin privileges can escalate to Global Admin by abusing the RoleManagement.ReadWrite.Directory permission.

The exploit works by:

  1. Finding a service principal with RoleManagement.ReadWrite.Directory permission
  2. Adding new credentials to that service principal
  3. Using those credentials to assign the Global Admin role to the current user

๐Ÿ“ข Tip: Open Dev Console (F12) for detailed logs.

๐Ÿ” Authentication

๐ŸŽฏ Service Principal Token Request

๐Ÿ›ก๏ธ Assign Global Admin Role

โœ… Verify Exploit

๐Ÿงน Cleanup