DET-179 · agent · confidence Medium

Automation and Agent Platform Grants

List OAuth grants and connections to automation and agent platforms that are not on the approved list.

Shadow agents usually connect through OAuth. Filtering consent logs for known automation and agent platforms, and for apps whose names include terms like GPT, agent or AI, gives a working inventory of employee-built agents and who owns them.

Personal API keys for model providers will not show up here, so pair this with egress checks on model API domains. Each finding should end with a named owner, a data scope and either approval or removal. Departed employees' grants should be revoked as part of offboarding.

Data sources
Microsoft Entra ID audit logsGoogle Workspace OAuth Token audit logSlack Audit LogsCASB app discovery
Platforms
Microsoft 365Google WorkspaceSaaSAI Platform

Logic

AuditLogs
| where OperationName == "Consent to application"
| extend App = tostring(TargetResources[0].displayName)
| where App matches regex @"(?i)(zapier|n8n|make\.com|integromat|pipedream|langchain|gpt|agent|copilot studio|relevance|lindy|bardeen)"
| where App !in (approved_ai_apps)
| project TimeGenerated, User = tostring(InitiatedBy.user.userPrincipalName), App

False positives

Approved automations reconnected after a token expiry.

Catches 1 technique