Skip to main content
Five Steps for Cloud Compliance Readiness·A practical playbook for security teamsDownload
Insight · Microsoft 365

High-privilege app permissions

High-privilege app permissions are broad Microsoft Graph application permissions, such as Directory.ReadWrite.All or Files.Read.All, that let an app reach tenant data without any signed-in user. You can list which enterprise apps hold them with a read-only Microsoft Graph PowerShell script and then judge whether each one still needs that reach.

Why it matters

Microsoft Graph has two kinds of permissions. Delegated permissions act on behalf of a signed-in user and are limited by what that user can do. Application permissions work without a signed-in user, so the app can reach any data the permission covers: Microsoft's own example is an app with the Files.Read.All application permission, which can read any file in the organization.[1]

Microsoft states that application permissions are highly privileged and that, from a least-privilege view, delegated permissions are the recommended approach whenever they meet the app's needs.[1] It also names Directory.Read.All as the highest-privileged read-only permission for Microsoft Entra ID resources and Directory.ReadWrite.All as second in the privilege ranking, to be used with caution and only when necessary.[1] Granting an app more than it needs increases its exposure to unauthorized and unintended access to data or operations.[1]

Find it yourself

The script below is read-only: it only signs in with the Application.Read.All scope and calls list/get cmdlets. It changes nothing in your tenant. It lists every application permission (app role) that has been granted on Microsoft Graph and flags the ones Microsoft's permissions overview singles out as high-privilege examples.[1][2]

# Read-only: Get-* cmdlets only, scope Application.Read.All
Connect-MgGraph -Scopes "Application.Read.All" -NoWelcome

$graphAppId = "00000003-0000-0000-c000-000000000000"   # Microsoft Graph
$graphSp = Get-MgServicePrincipal -Filter "appId eq '$graphAppId'"

# Map app role IDs to permission names
$roleName = @{}
foreach ($r in $graphSp.AppRoles) { $roleName[$r.Id] = $r.Value }

# Permissions named as high-privilege examples in Microsoft's overview
$watch = @("Directory.ReadWrite.All", "Directory.Read.All", "User.ReadWrite.All",
           "Files.Read.All", "Application.ReadWrite.All")

Get-MgServicePrincipalAppRoleAssignedTo -ServicePrincipalId $graphSp.Id -All |
  Select-Object PrincipalDisplayName, PrincipalId,
    @{n = "Permission"; e = { $roleName[$_.AppRoleId] }},
    @{n = "OnWatchList"; e = { $watch -contains $roleName[$_.AppRoleId] }} |
  Sort-Object @{Expression = "OnWatchList"; Descending = $true}, PrincipalDisplayName |
  Format-Table -AutoSize

Disconnect-MgGraph

Sign in with an account that is allowed to read application data in your tenant. Connect-MgGraph -Scopes is the documented way to request the scope you need.[2]

Read the result

Each row is one app (service principal) holding one Microsoft Graph application permission. Read it in this order:

  • OnWatchList = True: the app has a permission Microsoft calls out as broad. Check the name against the permission's description in the Microsoft Graph permissions reference.[1]
  • Any permission ending in .All: the last part of the name is the constraint, and All means the whole directory rather than only objects the app owns or a selected subset.[1] A .ReadWrite operation can change data; .Read only reads it.[1]
  • One app, many rows: an app that collects several broad permissions deserves a closer look than one that holds a single narrow one.
  • Apps you do not recognise: ask who owns them before judging the permission.

The list only shows permissions granted on Microsoft Graph. An app can also be granted privileges through directory roles, so an app that looks clean here is not proof that it is low-privilege.[1]

What to do next

  1. For each flagged app, find its owner and the business reason it exists.
  2. Ask whether a delegated permission would cover the same need; Microsoft recommends that model when it does.[1]
  3. Where an app needs application permissions, replace the broad permission with the narrowest one that still works. Microsoft's own example is Application.ReadWrite.OwnedBy instead of Application.ReadWrite.All, which limits the app to applications it creates or owns.[1]
  4. Remove permissions from apps nobody can explain. Changing consent is a write action, so do it deliberately through your normal change process, not from this script.
  5. Re-run the script after the change and confirm the row is gone or narrower.

See it continuously

Running a script gives you one snapshot. ConfigCobra's Inventory for Microsoft 365 includes a built-in "High-privilege app permissions" risk view next to your enterprise apps (service principals) and app registrations, a relation graph that shows how objects connect, findings linked to the inventory objects they concern, and a CSV export. ConfigCobra reads your tenant with read-only Microsoft Graph permissions.

See it for your whole tenant, continuously

Inventory & Insights lists these risks with built-in views and CSV export, read-only.

Get in touch

Let's talk.

Whether you're evaluating ConfigCobra, running an audit, or managing a client fleet — we respond within one business day.

Free trial