Reference · Detection
How to Detect Shadow AI
Eight signals, the log sources, the queries, and the evidence each one produces — written to be run, not read.
01The principle
No single control finds shadow AI. Network tools see traffic to chatbot domains but miss AI inside approved SaaS. OAuth audits see connected apps but miss copy-paste use. Surveys hear what people admit but miss what they do not. Detection is correlation: each signal covers a gap the others leave.
The output you are buildingAn inventory with evidence: tool, owner, user count, data classes it can reach, and the trace that proves it. Everything else is a by-product.
02Eight signals
| Signal | Finds | Misses |
|---|---|---|
| Secure web gateway or CASB | Traffic to known AI apps | Personal devices off-network |
| DNS logs | Lookups from managed networks | Encrypted DNS that bypasses resolvers |
| OAuth consent grants | Connected AI apps and scopes | Copy-paste with no account |
| Browser extensions | Installed AI add-ons and permissions | Unmanaged browsers |
| SaaS AI feature audit | Copilots enabled inside approved apps | Vendor-hidden settings |
| Egress to model APIs | Code calling model endpoints | Calls through a wrapper |
| Expense and card data | Paid subscriptions outside procurement | Free tiers |
| Employee survey | Why and what data | Anything unreported |
03Google Workspace checks
Audit log. Admin console → Reporting → Audit log. Filter for Drive and Gmail events to and from AI domains, and for sign-ins to services not in your app list. Export as CSV; the evidence is the export, not a screenshot.
OAuth grants. Security → Access and data control → API controls → App access control. Note the app name, scopes, and user count. Anything with mail, drive, or directory scope deserves a written decision.
Chrome extensions. Admin console → Devices → Chrome → Apps and extensions. Filter managed devices for extensions that can "read and change all your data on all websites." That permission is the risk, not the category.
Drive activity. Look for files shared outside the domain to AI services, and for bulk exports from Drive in the last 30 days.
04Microsoft 365 checks
Unified audit log. Microsoft Purview → Audit. Search for Copilot interactions and for AI app names. The PowerShell form, run by a compliance admin, is:
Search-UnifiedAuditLog -StartDate (Get-Date).AddDays(-30) -Operations CopilotInteraction -ResultSize 5000
Entra consent. Entra ID → Enterprise applications. Sort by consent date; filter for apps with delegated mail, files, or directory scopes. User-consented apps bypass admin approval unless you have restricted it.
Defender for Cloud Apps. If licensed, the Generative AI app category flags sanctioned and unsanctioned AI use by user and volume.
Edge extensions. Microsoft 365 admin center → Settings → Microsoft Edge. The extension report lists permissions; review weekly until stable.
05Network and egress
Start with a domain list and a 30-day window:
chat.openai.com,chatgpt.com,api.openai.comclaude.ai,api.anthropic.comgemini.google.com,generativelanguage.googleapis.comcopilot.microsoft.com,perplexity.ai
From the proxy or firewall, export per-domain: unique users, request count, bytes. A sudden spike from one team is the pattern to investigate. Then check egress from your own infrastructure: VPC flow logs or firewall logs for calls to model APIs from servers that have no business calling them.
06Endpoint and browser
Managed-device inventory should answer three questions: which AI desktop apps are installed, which local model runners exist, and which MCP client configuration files are on disk. On developer machines, the last one matters most: an MCP config file names tools and credentials, and it is a map of what an agent can do.
The browser is where most shadow AI happens. The extension report gives install counts and permissions; the missing piece is which extensions are used on which sites. Where you have the telemetry, correlate extension IDs with the domains in the gateway logs.
07The survey
Five questions, sent by the person people trust, not by security:
- Which AI tools do you use for work, even if nobody approved them?
- What do you put into them — documents, emails, client data?
- What is missing from the approved option that makes you use something else?
- What would make you switch?
- What have you stopped using, and why?
Promise no discipline for the answers, and keep the promise. The survey is the only signal that explains the other seven, and it dies the first time someone is punished for honesty.
08The five-day plan
| Day | Check | Output |
|---|---|---|
| Monday | DNS/proxy export; AI domain list | Domain × users × bytes table |
| Tuesday | OAuth grants (Workspace and Entra) | App × scopes × users × grant date |
| Wednesday | Extension report and SaaS AI settings | Extension × permissions; feature × owner |
| Thursday | Egress from code; expense search | Repo × key owner; merchant × cardholder |
| Friday | Survey and consolidation | Inventory with owner per line |
09The evidence pack
Keep these six artifacts. They are what a policy is built on and what an auditor asks to see.
- AI domain usage exportwith dates and user counts
- OAuth grant exportwith scopes and consent dates
- Extension inventorywith permissions
- SaaS AI feature listwith owner and data scope
- Code egress reportwith key owners
- Survey resultswith tools named
10What detection misses
Three things, and you should say so in the report. AI features a vendor does not expose in admin settings; use on personal devices outside managed networks; and anything a person deliberately hides. Detection raises the floor; it does not reach zero. The policy and the sanctioned option cover what the logs cannot see.
Free · the 24-point audit
Get the shadow AI audit
Twenty-four checks across visibility, identity, data, and governance — each with the evidence that answers it. The printable version of the method on this page.
We use the address to send the pack, then a person checks in once. No list, no sequence; no sales calls unless you ask. Privacy.
Next: the shadow AI policy template — turn the inventory into rules people can follow.