What a Valid-Looking Attack Looks Like to a Rule

A detection rule evaluates a predicate over events. A sign-in from a listed country, a file hash on a block list, ten failed logins in five minutes. That model works when the attack produces an event that is wrong on its face. OAuth token abuse often produces none. A user, or an app acting for a user, consented to a set of scopes. Entra ID issued a token. Microsoft Graph accepted a call that the token was entitled to make. Every step in that chain is valid, and the abuse lives in the sequence and in how far the sequence sits from what that app normally does.

Microsoft's own app governance detections read like descriptions of sequences. One alert fires when an OAuth app flagged high-risk by a machine learning model consented to suspicious scopes, created a suspicious inbox rule, and then accessed mail folders and messages through the Graph API. Another fires when a line-of-business app updates a certificate or secret, or adds new credentials, and within a few days shows unusual activity or high-volume usage against Exchange through Graph. The Learn page states the premise plainly: since threat detections are nondeterministic by nature, they are only triggered when there is behavior that deviates from the norm.

The second alert is the instructive one. Rotating a secret is routine maintenance, and a burst of Graph calls to Exchange is routine for plenty of apps. Neither event is suspicious alone. The pairing, with a delay between the two, is the signal. A rule author can encode a pairing with a time window, but the window and the volume threshold are guesses made once, and "high volume" only has a meaning relative to that particular app's history. An app that reads ten thousand messages a day as part of its job and an app that has never touched Exchange need different thresholds, and a static rule gets one of them wrong.

That is the structural limit. A rule encodes a judgment its author made at writing time, about an average app and an average user. Behavioral detection moves the judgment to the data. Microsoft Sentinel's UEBA builds behavioral profiles for users, hosts, IP addresses, and applications, compares current activity against the entity's own history, its peer group, and organization-wide patterns, and assigns risk scores. It runs on Entra ID, Defender for Identity, and Office 365 data among others, which means the quality of the baseline depends on those connectors being live and on enough history existing to compare against. A newly registered app has little history to deviate from, so I would expect a thin baseline there. That is my inference, and the documentation does not discuss the case.

The scoring design is worth a close look, because it shows where the difficulty went. UEBA produces two scores. The investigation priority score runs from 0 to 10, works at the level of a single event in near real time, and blends the rarity of the entities involved with abnormal patterns over time. The anomaly score runs from 0 to 1, is computed in batch at the behavior level by a model trained on the workspace's telemetry, and looks across multiple events. Learn gives an example where a user performs an Azure operation for the first time. The investigation priority is high because the event is a first, and the anomaly score is low because occasional first-time Azure actions are common and not inherently risky. Two defensible scores disagree, and a human or a policy has to decide which one governs. A rule never had that problem because it never produced a graded answer.

Defender XDR sits on the other side of the same trade. Its automatic attack disruption correlates signals across endpoints, identities, email, and SaaS apps into a single incident and then acts at the incident level, and the response action list includes one for OAuth app compromise through Defender for Cloud Apps. Correlation across products is what lets a consent event, a mailbox rule, and a Graph read be recognized as one story. Per-product rules each see one chapter.

A similar shape appeared in the case I covered in 2026-10-20 Seven Minutes and Twenty-Four Hours. Microsoft's September 2026 report on Storm-3168, also called JadePuffer, describes two compromised service principals in a single tenant. One spent about 15 and a half hours on discovery, with more than 300 successful read operations. The other attempted more than 100 Storage Account deletions, most of which succeeded, deleted one Key Vault, one Function App, and one App Service plan, and tried and failed to delete Azure SQL databases and Site Recovery and Backup locks, all inside a burst of about seven minutes. Microsoft states that it is unclear how the service principal was initially compromised. A client secret had been posted in plaintext in a public GitHub issue, but Microsoft could not confirm that it was used in this activity. Either way, every call came from a principal the tenant had issued credentials to, so the only thing left to detect on was behavior: one principal reading the tenant for hours and another then deleting in bulk. Microsoft's report does not say whether Sentinel UEBA or any other behavioral detection fired in the affected tenant. The point I take from the case is that when the front door is a valid credential, the thing to watch is what the holder does next.

There is a cost line attached. UEBA is included with Sentinel at no extra charge, while the data it uses is stored in Log Analytics tables and follows standard Sentinel pricing. The behavioral layer therefore turns into an ingestion budget conversation, and the detection coverage a SOC gets is bounded by which logs it chose to pay for. In NIST CSF 2.0, the Detect function has adverse event analysis (DE.AE) as its own category, covering the analysis of anomalies, indicators of compromise, and other potentially adverse events to characterize them and detect incidents, and one of its outcomes, DE.AE-03, is that information is correlated from multiple sources. Measured against that, coverage is best described by which entity types have a baseline and which log sources feed it.

The forward implication is the part I keep returning to. Microsoft Entra creates Agent IDs specifically for AI agents, and the agent setup guidance has administrators assign those identities roles with specific permissions. Each agent a company deploys under one adds another actor whose individual actions will all be valid, and that framing is mine. A detection estate counted in rules was always a measure of known-bad patterns. The more useful count may be how many classes of actor have a baseline at all.


Sources: Microsoft Learn, "Investigate OAuth app threat detection alerts with app governance"; Microsoft Learn, "Advanced threat detection with User and Entity Behavior Analytics (UEBA) in Microsoft Sentinel"; Microsoft Learn, "Automatic attack disruption in Microsoft Defender"; Microsoft Learn, "Microsoft Security Copilot Phishing Triage Agent in Microsoft Defender" (Entra Agent ID setup); Microsoft Security Research, "Storm-3168: agentic-driven cloud attacks using compromised service principals" (Sep 25, 2026); Bill Toulas, "JadePuffer agentic AI attacks target Azure, destroy cloud resources," BleepingComputer (Sep 28, 2026); NIST, The NIST Cybersecurity Framework (CSF) 2.0, CSWP 29 (Feb 26, 2024).