Log Analytics Solutions with ML-Driven Anomaly Detection: What's Actually Built In
We get some version of this question every quarter: "we want ML-driven anomaly detection on top of our Log Analytics data, what do we build?" The answer is usually that you don't build it. Microsoft Sentinel already ships a machine learning engine for this, called User and Entity Behavior Analytics, and most teams either haven't turned it on or turned it on and never queried the tables it writes to. Before anyone scopes a custom anomaly pipeline on top of a Log Analytics workspace, it's worth understanding what Sentinel's UEBA does, what it costs to run at real ingestion volumes, and where its blind spots actually are.
What UEBA is actually doing under the hood
UEBA builds dynamic behavioral profiles for users, hosts, IP addresses, applications, and other entities, then flags anomalies by comparing current activity against those established baselines (Microsoft Learn: UEBA in Microsoft Sentinel). It applies behavioral modeling to catch deviations, and it does peer group analysis and blast radius evaluation to figure out how much damage an anomalous session could actually do.
The risk scoring isn't just "this looks weird." It factors in geographic and device deviation, how activity frequency compares to that entity's own history, how far the behavior sits from the entity's peer group, and how far it sits from org-wide norms. That's a meaningfully richer model than a static threshold alert on failed logons, and it's why we point clients here first instead of standing up a separate anomaly detection service that duplicates work Sentinel is already doing against the same data.
The catch: UEBA only does this well once you've connected the right sources. Entra ID, Defender for Identity, and Office 365 are the baseline set Microsoft calls out for building useful profiles. Skip those connectors and UEBA has nothing to baseline against.
The tables you should actually be querying
UEBA writes its output across several tables, each built for a different stage of investigation:
- IdentityInfo holds detailed entity profiles built from Entra ID and, through Defender for Identity, on-prem AD.
- BehaviorAnalytics holds enriched behavioral data with geolocation and threat intel context, plus deviation scores from baseline.
- UserPeerAnalytics holds dynamically calculated peer groups, ranked by a TF-IDF weighting where smaller groups carry more signal.
- Anomalies holds the events that got flagged.
- SentinelBehaviorInfo and SentinelBehaviorEntities sit behind a separate "behaviors layer" you enable independently, and they translate raw logs into structured who-did-what-to-whom summaries with MITRE ATT&CK mappings.
That last pair is easy to miss. If you enabled UEBA but never explicitly turned on the behaviors layer, those two tables won't exist in your workspace at all, and any hunting query that assumes they're populated will just come back empty.
A simple starting query against BehaviorAnalytics to see what volume of flagged behavior you're actually generating:
BehaviorAnalytics
| summarize AnomalousEvents = count() by bin(TimeGenerated, 1h)
| order by TimeGenerated desc
Run that for a week before you commit to any downstream automation. If it's near-zero, your connector coverage is the problem, not your detection logic.
Microsoft also publishes a UEBA Essentials solution: a set of pre-built hunting queries, including multi-cloud anomaly queries that cover Azure, AWS, GCP, and Okta (same UEBA doc). Our judgment: install that solution before writing a single custom KQL rule against these tables. We've seen teams spend a sprint rebuilding queries that ship for free.
Where Entra ID Protection fits, and where it doesn't
Sentinel's UEBA isn't the only ML layer in play. Entra ID Protection runs its own set of risk detections, mapped to a riskEventType value you'll see in Graph API queries and, by extension, in Sentinel incidents sourced from Entra (Microsoft Learn: What are risk detections?). Some of these are real-time (atypical travel, password spray), some are offline/batch (mass access to sensitive files, suspicious inbox forwarding).
The licensing detail that trips people up: full detail on most of these detections requires Entra ID P2. Without it, you get a detection titled "Additional risk detected" with no underlying detail, mapped to a generic riskEventType. If your SOC is triaging "Additional risk detected" incidents and can't tell what actually happened, that's not a Sentinel problem, it's a licensing gap. Check your tenant's Entra ID P2 coverage before assuming your anomaly pipeline is broken.
This matters for anomaly detection strategy specifically because UEBA's peer and baseline modeling is strongest when it has rich identity signal to chew on. If Entra ID Protection is only handing you generic detections, UEBA's downstream behavioral analytics are working with a thinner signal than the architecture diagram implies.
What this costs to run
Anomaly detection quality is a direct function of how much you ingest, and ingestion is billed by the gigabyte. Using Azure Retail Prices API list pricing for Log Analytics in East US, pay-as-you-go, pulled 2026-11-11 (Azure Retail Prices API):
| Meter | Unit | List price |
|---|---|---|
| Analytics Logs Data Ingestion | 1 GB | $2.3 |
| Standard Data Analyzed | 1 GB | $2.3 |
| Premium Data Analyzed | 1 GB | $3.5 |
| Analytics Logs Data Retention | 1 GB/Month | $0.1 |
These are list prices for one region and one commitment model; your actual rate depends on region and any commitment tier or agreement you're on, so treat this table as a planning input, not an invoice. The practical implication for anomaly detection specifically: UEBA's accuracy depends on broad connector coverage (Entra ID, Defender for Identity, M365, and whatever cloud/Okta sources you're feeding the multi-cloud queries), and every one of those connectors adds ingestion volume. Retention for the UEBA tables stacks on top of that at the retention meter rate. We've had clients balk at a Sentinel anomaly detection proposal because they priced it against ingestion volume alone and forgot retention compounds monthly.
Where this still needs a human
UEBA and Entra ID Protection will surface the anomaly. Neither one will write your detection logic for lateral movement chains, tune your peer group definitions for a reorg that just happened, or decide which "Additional risk detected" incidents are worth escalating without P2 detail behind them. That triage work, plus mapping UEBA's MITRE ATT&CK tags into your actual incident response runbooks, is where most of the real engineering effort goes after the ML layer is turned on.
If you're scoping a detection program and want help wiring UEBA, Entra ID Protection, and your existing SIEM content into something your SOC can actually act on, see our detection engineering practice.
Next steps
If you want a second set of eyes on your Sentinel UEBA setup, connector coverage, or ingestion cost model before you commit budget to it, get in touch.
