MSP StockroomFind a guide, template or tool…/
Curated SOPs / Microsoft 365 and identity

M365 Curated SOP / Microsoft 365 and identity

Review which apps, including AI tools, can read a client's Microsoft 365 data

List every third-party app that users or admins have let into a client's Microsoft 365 tenant, what data each one can read, and who allowed it.

Low risk / Read-only / Reviewed December 1, 2026

Written and maintained by MSP Stockroom. Nobody else edits it.

On this page

Before you run anything: read every command first and understand what it does. Replace example names, domains and addresses with your own. Try it on a test device or tenant before a client's. Keep client names, passwords and keys out of tickets and chat.

Purpose

List every third-party app that users or admins have let into a client's Microsoft 365 tenant, what data each one can read, and who allowed it. AI assistants, meeting note-takers and browser add-ins often get in this way when a user clicks Accept on a consent prompt. Use it in the first week with a new client, at each quarterly review, and whenever a client asks which AI tools can see their mail or files. Read-only: nothing in this SOP changes the tenant.

Scope and prerequisites

  • Run by the client's assigned engineer.
  • Needs an account that can read the directory and policies, such as Global Reader.
  • The Microsoft Graph PowerShell SDK installed from the PowerShell Gallery.
  • Store the results in your documentation platform, never in this library.

Steps

  1. Sign in with read-only scopes:
    # Read-only scopes. You will be asked to sign in to the client's tenant.
    Connect-MgGraph -Scopes "Directory.Read.All", "Policy.Read.All"
  2. Check whether ordinary users can consent to apps on their own:
    (Get-MgPolicyAuthorizationPolicy).DefaultUserRolePermissions.PermissionGrantPoliciesAssigned

    Read the result:

    • No entry starting with managePermissionGrantsForSelf: users cannot consent; only admins can let apps in.
    • managePermissionGrantsForSelf.microsoft-user-default-low: users can consent only to verified publishers and to permissions classified as low impact.
    • managePermissionGrantsForSelf.microsoft-user-default-legacy: any user can let any app read their own data without admin review. Record this as a finding.
  3. List every delegated permission grant, with the app, its publisher and who it covers:
    Get-MgOauth2PermissionGrant -All | ForEach-Object {
        $app = Get-MgServicePrincipal -ServicePrincipalId $_.ClientId
        if ($_.ConsentType -eq "AllPrincipals") {
            $grantedFor = "All users (admin consent)"
        } else {
            $grantedFor = (Get-MgUser -UserId $_.PrincipalId).UserPrincipalName
        }
        [pscustomobject]@{
            App        = $app.DisplayName
            Publisher  = $app.VerifiedPublisher.DisplayName
            GrantedFor = $grantedFor
            Scopes     = $_.Scope.Trim()
        }
    } | Sort-Object App, GrantedFor
  4. Mark each app as expected or not. Give extra attention to any app that:
    • has no verified publisher (empty Publisher column);
    • holds Mail.Read, Mail.ReadWrite, Files.Read.All, Files.ReadWrite.All, Sites.Read.All, Chat.Read or Calendars.Read, which let it read mail, files, Teams chats or calendars;
    • holds offline_access, which lets it keep reading after the user closes it;
    • is an AI assistant or note-taker the client has not approved.
  5. In the Microsoft Entra admin center, open Enterprise applications, then each app you marked, then Permissions, and note any permissions listed under Admin consent with the type Application. Those let the app read data with no user signed in at all.
  6. Disconnect when finished:
    Disconnect-MgGraph

Verify

Every app on the list has a business owner at the client and a reason, and the consent setting from step 2 matches what the client wants. Anything without an owner goes to the client contact as a question, not a change.

Rollback

Nothing to roll back; this SOP only reads. Revoking an app's access or changing the consent setting is a separate change, made with the client's approval. Existing grants stay in place when the consent setting changes, so revoke unwanted apps separately.

Notes

The script calls the directory once per grant, so large tenants take a few minutes. A user-consented grant covers only that user's data; an admin grant (All users) covers everyone, so review those first. See https://learn.microsoft.com/entra/identity/enterprise-apps/manage-application-permissions and https://learn.microsoft.com/entra/identity/enterprise-apps/configure-user-consent for Microsoft's guidance.

Sources and notes

Curated SOP from the MSP Stockroom SOP library (curated/m365-identity/review-app-consents-including-ai-tools.md). Last reviewed December 1, 2026. Tested on: Microsoft Graph PowerShell SDK 2.x; PowerShell 7.4. Vendor screens and commands change; check the vendor documentation before you rely on a step. Found a mistake? See corrections.

Search the stockroom

↑ ↓ to choose · Enter to open · Esc to close

Open the full search page →