AI-13 Field guide / AI and automation
Find the AI tools your client's staff already use
Shadow AI leaves traces in places you can already read: app consent grants, DNS logs, browser inventories and the card statement. Check each, then block, sanction or move every tool you find to a business plan.
On this page
Agree the scope before you look
Tell the client what you'll check and get their agreement: you're looking at which apps are in use, not what anyone typed, and staff should hear about it from their employer before they hear it from you. Record findings per app, not per person.
List app consent grants in Entra ID
When a user clicks Accept on an app's permission prompt, Entra ID records a delegated permission grant. To check one app, go to Entra ID > Enterprise apps, open it and select Permissions: the Admin consent tab shows what an admin granted, the User consent tab what individual users granted.
For the whole tenant, this read-only Microsoft Graph PowerShell exports every delegated grant to an app not published by Microsoft, and every app-only permission to Microsoft Graph. It needs an account that can read the directory, such as Global Reader. The scopes need admin consent, so the first run in a tenant may need a Global Administrator to approve them.
# Read-only. Modules: Microsoft.Graph.Applications, Microsoft.Graph.Identity.SignIns
Connect-MgGraph -Scopes "Directory.Read.All","Application.Read.All","Policy.Read.All" -NoWelcome
# Who can consent today
(Get-MgPolicyAuthorizationPolicy).DefaultUserRolePermissions.PermissionGrantPoliciesAssigned
# Delegated grants to apps not published by Microsoft
$msft = 'f8cdef31-a31e-4b4a-93e4-5f571e91255a'
$sps = @{}
Get-MgServicePrincipal -All -Property Id,DisplayName,AppId,AppOwnerOrganizationId,VerifiedPublisher |
ForEach-Object { $sps[$_.Id] = $_ }
Get-MgOauth2PermissionGrant -All |
Where-Object { $sps[$_.ClientId].AppOwnerOrganizationId -ne $msft } |
ForEach-Object {
$app = $sps[$_.ClientId]
[pscustomobject]@{
App = $app.DisplayName
AppId = $app.AppId
Publisher = $app.VerifiedPublisher.DisplayName
ConsentType = $_.ConsentType
UserId = $_.PrincipalId
Resource = $sps[$_.ResourceId].DisplayName
Scopes = "$($_.Scope)".Trim()
}
} | Sort-Object App | Export-Csv .\delegated-grants.csv -NoTypeInformation
# Application (app-only) permissions to Microsoft Graph
$graph = Get-MgServicePrincipal -Filter "appId eq '00000003-0000-0000-c000-000000000000'"
$roles = @{}; $graph.AppRoles | ForEach-Object { $roles[$_.Id] = $_.Value }
Get-MgServicePrincipalAppRoleAssignedTo -ServicePrincipalId $graph.Id -All |
Where-Object PrincipalType -eq 'ServicePrincipal' |
Select-Object PrincipalDisplayName, @{n='Permission';e={$roles[$_.AppRoleId]}}, CreatedDateTime |
Export-Csv .\graph-app-permissions.csv -NoTypeInformationIn the CSVs, look for unfamiliar names, apps with no verified publisher, ConsentType AllPrincipals (an admin consented for every user), and scopes such as Mail.Read, Files.Read.All or offline_access, which lets an app keep access without the user present.
Gotcha: the portal can't remove grants on the User consent tab. Revoke them with Microsoft Graph or PowerShell, and fix the consent setting at the same time, because revoking doesn't stop the user consenting again tomorrow.
Tighten user consent
By default, Entra ID lets users consent to apps for permissions that don't need admin consent. The first command in the script shows the current setting: microsoft-user-default-legacy means users can consent to any app, microsoft-user-default-low means only verified publishers for low-impact permissions, and no consent entry means user consent is off. Change it in Entra ID > Enterprise apps > Consent and permissions > User consent settings.
Restrict consent and turn on the admin consent workflow together, under Admin consent settings on the same page: set "Users can request admin consent to apps they are unable to consent to" to Yes and name reviewers. Without it, users hit a dead end and go back to personal accounts. Turning it on needs a Global Administrator.
Check third-party app access in Google Workspace
For Google Workspace clients, go to Security > Access and data control > API controls > Manage Third-Party App Access in the Admin console. Accessed apps lists apps users have signed in to with their Google account; Configured apps lists those an admin has already set to Trusted, Limited or Blocked. Its settings can stop users granting access to unconfigured apps; turn that on only once there's a way to request one.
Search DNS, firewall and web filter logs
Your DNS filter, firewall or secure web gateway sees AI used in a browser tab, which never touches a consent prompt. If your product has an AI or generative AI category, report on it for the last 30 days. If not, search for domains such as chatgpt.com, claude.ai, gemini.google.com and perplexity.ai.
Gotchas: AI features built into tools the client already uses don't show up as separate domains. And phones on mobile data or home networks outside your filter won't appear at all.
Use Defender for Cloud Apps if the client has it
Microsoft Defender for Cloud Apps discovers cloud apps from network logs and from Defender for Endpoint, and its catalog has a Generative AI category. In the Defender portal, go to Cloud apps > Cloud discovery, open Discovered apps and filter by that category.
Check the licence first. As of December 2026 it comes with Microsoft 365 E5, EMS E5 and the Microsoft Defender Suite, or as a standalone licence; Microsoft 365 Business Premium isn't on Microsoft's list. With it, tag an app Unsanctioned and, with Defender for Endpoint network protection in block mode and Enforce app access turned on, devices can't reach it. Microsoft says blocking can take up to three hours to apply. The Monitored tag shows users a warning they can click through, which helps during a move to an approved tool.
Inventory browser extensions
An AI browser extension can read every page its user opens, admin portals included. Ways to list them:
- Defender Vulnerability Management: Endpoints > Vulnerability management > Inventories > Browser extensions lists Edge, Chrome and Firefox extensions on Windows devices. It needs the Defender Vulnerability Management add-on or standalone licence.
- Chrome Enterprise: in the Google Admin console, Devices > Chrome > Reports > Apps & extensions usage covers enrolled browsers with reporting on. New data can take up to 24 hours.
To control them in Edge, set "Control which extensions cannot be installed" (ExtensionInstallBlocklist) and "Allow specific extensions to be installed" (ExtensionInstallAllowlist) in the Intune settings catalog. A blocklist of * with an allowlist of approved extension IDs is the strictest setup.
Read the card statements
Ask the client's finance contact for card and expense lines mentioning OpenAI, ChatGPT, Anthropic, Claude, Perplexity or "AI" over the last 12 months. Personal subscriptions expensed back to the company show that a team needs a business plan, and this is one of the few checks that finds tools used only on personal devices.
Decide what to do with each finding
- Block when the tool has no business plan, its data terms don't meet the client's needs, or it duplicates an approved tool. Revoke the grants, add it to the DNS or web filter block list, and tag it Unsanctioned if you have Defender for Cloud Apps.
- Sanction and move to a business plan when people clearly need it. Buy business seats, connect SSO where the plan offers it, move users off personal accounts, and add it to the AI acceptable use policy. Compare plans in the data-handling comparison.
- Allow with limits for tools that never see business or client data, with the limit written into the policy.
Report back as a short list: app, number of users, what data it could reach, and your recommendation. Rerun the checks every quarter and compare against the last export.
Checklist / Usable takeaway
Shadow AI discovery checklist
- Scope agreed with [client contact]; staff told before checks start.
- Entra ID grants exported; apps not published by Microsoft reviewed.
- User consent setting recorded: [current value]; admin consent workflow [on / off].
- Google Workspace Accessed apps reviewed, if the client uses Workspace.
- DNS, firewall or web filter AI report run for [date range].
- Defender for Cloud Apps Generative AI discovery checked, or licence gap noted.
- Browser extensions inventoried on [number] devices.
- Expense and card lines reviewed for [period].
- Each finding marked block, sanction or allow with limits, with an owner and a date.
Keep each export with the date you ran it. Next quarter's run is a comparison against this one.
Sources and notes
- Microsoft Learn: Configure how users consent to applications
- Microsoft Learn: Configure the admin consent workflow
- Microsoft Learn: Review and revoke permissions granted to applications
- Microsoft Graph: List oauth2PermissionGrants
- Microsoft Graph: List servicePrincipals
- Microsoft Graph: List appRoleAssignments granted for a service principal
- Microsoft Learn: Microsoft first-party application tenant
- Google Workspace: Control which third-party apps access Workspace data
- Microsoft Learn: Manage generative AI apps with Defender for Cloud Apps
- Microsoft Learn: Microsoft Defender licensing service description
- Microsoft Learn: Govern discovered apps with Defender for Endpoint
- Microsoft Learn: Browser extensions assessment
- Google: Chrome apps and extensions usage report
- Microsoft Learn: Edge ExtensionInstallBlocklist policy
- Microsoft Learn: Configure Edge with the Intune settings catalog
The script uses only Get cmdlets and writes two CSV files to the current folder; it changes nothing in the tenant. Product paths and licence requirements change often, so recheck them before you quote a client. Vendor details checked December 1, 2026. See method and evidence notes.