DET-202 · agent · confidence Medium
Logging Every Agent Login
Capture each authentication attempt an agent makes, including failures, across all resources.
Agents authenticate constantly: to APIs, databases, MCP servers, SaaS apps. Sampling these hides the interesting cases. This detection logs every attempt with the agent, identity, credential ID, target, method, source and result.
Failed logins, tries against resources the agent should not know about, new auth methods and credential type changes tell a story of probing or hijacking. A burst of failures against a database the agent has never touched is a classic lead. Make sure vendors and third-party tools are covered, not only internal systems.
- Data sources
- Identity provider logsCloudTrailAPI gateway logsMCP server logsDatabase auth logs
- Platforms
- IdentityAWSSaaSAI Platform
Logic
Alert when an agent identity has: >5 failures to a single target in 10 minutes; any success on a resource not in its approved target list; or a new auth method. Example KQL: SigninLogs | where AppDisplayName in (AgentApps) | summarize fails=countif(ResultType != 0), targets=dcount(ResourceDisplayName) by AppId, bin(TimeGenerated, 10m) | where fails > 5 or targets > 3.
False positives
Expired tokens after rotation create failure bursts. Correlate with rotation events.