What is UEBA?
UEBA (user and entity behavior analytics) builds a baseline of normal activity for each user, host, IP address and application, then flags activity that breaks it: a first sign-in from a new country, a resource nobody in the user's peer group touches. It catches abuse of valid accounts that matches no signature, and scores each deviation for triage.
Definition
- UEBA
- UEBA (user and entity behavior analytics) builds a baseline of normal activity for each user, host, IP address and application, then flags activity that breaks it: a first sign-in from a new country, a resource nobody in the user's peer group touches. It catches abuse of valid accounts that matches no signature, and scores each deviation for triage.
How UEBA Works
A detection rule asks whether an event matches a pattern someone wrote down. UEBA asks whether the event is normal for this account. Only the second question helps when an attacker signs in with a real password to a real account, because nothing in the event itself is malicious. Microsoft's description of the feature in Sentinel sums up the category well: it builds "dynamic behavioral profiles for users, hosts, IP addresses, applications, and other entities" and compares current activity against them to find compromised accounts, insider attacks and lateral movement.
What a baseline is made of
Three comparisons do most of the work, and Sentinel exposes each one as its own flag:
- The user against their own history. Has this account connected from this country before, used this ISP, opened this app, touched this resource?
- The user against their peers. Sentinel builds peer groups from security group membership, mailing lists and similar associations, keeps the top 20 peers per user in the
UserPeerAnalyticstable, and weights them with TF-IDF so a small team counts for more than an all-staff list. - The user against the whole tenant. Is this the first time anyone in the organization has connected from that country or run that action?
A single first-time flag is weak evidence. A country that is new for the user, that none of their peers connect from, reached through an ISP nobody in the tenant has used, is much stronger.
UEBA only sees what you feed it. In Sentinel the inputs include Entra ID sign-in and audit logs, Azure Activity, Windows security events 4624, 4625, 4648, 4672 and 4688, Defender XDR device logons, AWS CloudTrail, GCP audit logs, Okta, and firewall, VPN and proxy events from Check Point, Fortinet and Zscaler sent as CEF. If your VPN comes from another vendor, UEBA has no VPN-specific baseline unless the VPN authenticates through Entra ID.
Reading the BehaviorAnalytics table
UEBA writes its output to the BehaviorAnalytics table. Each row is one activity, such as a sign-in or an Azure operation. It carries the raw facts (UserPrincipalName, ActivityType, ActionType, SourceIPAddress, SourceIPLocation, SourceDevice, DestinationDevice) and four columns with the analytics:
| Column | Type | What it holds |
|---|---|---|
UsersInsights | dynamic | Directory context: display name, IsDormantAccount (unused for 180 days), IsNewAccount (created in the last 30 days), IsLocalAdmin, and BlastRadius (Low, Medium or High, calculated only when the user's Manager field is filled in Entra ID) |
DevicesInsights | dynamic | Browser, OS, device type, ISP, user agent and, when the IP matches threat intelligence, ThreatIntelIndicatorType (Botnet, C2, Proxy, Malware and others) |
ActivityInsights | dynamic | The behavioral flags, each True or False, comparing the activity with the user, the peers and the tenant |
InvestigationPriority | int | 0 to 10, where 0 is benign and 10 highly anomalous. In Microsoft's words, the score "quantifies the degree of deviation from the expected behavior" |
The flags in ActivityInsights do not all look back the same distance. Sentinel compiles the baseline each time it is used, with a fixed lookback per flag:
| Flag | Lookback |
|---|---|
ActionUncommonlyPerformedByUser, CountryUncommonlyConnectedFromByUser, ISPUncommonlyUsedByUser | 10 days |
FirstTimeUserConnectedViaBrowser, FirstTimeUserConnectedFromDevice, FirstTimeUserConnectedViaISP | 30 days |
FirstTimeUserConnectedFromCountry, CountryUncommonlyConnectedFromAmongPeers | 90 days |
FirstTimeUserPerformedAction, ActionUncommonlyPerformedAmongPeers, FirstTimeUserAccessedResource | 180 days |
Those windows explain a lot of noise. "Uncommon for this user" looks back only 10 days, so after two weeks of leave there is almost nothing in the window to compare against. The country flag looks back 90 days, so someone who visits the same client every four months gets a first-time flag on every trip.
InvestigationPriority is one of two scores. The Anomalies table has an AnomalyScore from 0 to 1, produced in batch by a machine learning model that looks across many events. Microsoft's example of the difference: a user's first Azure operation scores high on investigation priority, because it is a first, and low on anomaly score, because occasional first-time Azure actions are common. Sort single events by the 0-10 score; look for patterns over time with the anomaly score.
Identity context lives in IdentityInfo, synchronized from Entra ID and, through Defender for Identity, from on-premises Active Directory. Sentinel resynchronizes it in full every 14 days and picks up profile changes within 15 to 30 minutes, and the default retention is 30 days. Department, job title, group membership and Entra roles come from there when you need to know whether the access makes sense for that person. Microsoft suggests waiting about a week after enabling UEBA before looking for insights.
A triage query
This query pulls the last day of activity with an investigation priority of 5 or more and puts the flags an analyst reads first into their own columns. The threshold of 5 is a starting point for this example, not a Microsoft recommendation. Microsoft's own hunting queries in the UEBA Essentials solution filter on InvestigationPriority > 0 and then on specific flags.
// UEBA triage: last 24 hours, priority 5 or more, key flags as columns
BehaviorAnalytics
| where TimeGenerated > ago(1d)
| where InvestigationPriority >= 5
| extend NewCountry = ActivityInsights.FirstTimeUserConnectedFromCountry == True,
PeersRareCountry = ActivityInsights.CountryUncommonlyConnectedFromAmongPeers == True,
NewISP = ActivityInsights.FirstTimeUserConnectedViaISP == True,
NewDevice = ActivityInsights.FirstTimeUserConnectedFromDevice == True,
Dormant = UsersInsights.IsDormantAccount == True,
TIType = tostring(DevicesInsights.ThreatIntelIndicatorType)
| project TimeGenerated, UserPrincipalName, ActivityType, ActionType, SourceIPAddress,
SourceIPLocation, InvestigationPriority, NewCountry, PeersRareCountry, NewISP,
NewDevice, Dormant, TIType, SourceRecordId
| order by InvestigationPriority desc, TimeGenerated descFor a sign-in, SourceRecordId joins back to the raw event in SigninLogs on _ItemId, the same join Microsoft uses in its Anomalous Geo Location Logon hunting query. The raw event gives you the app, the MFA result and the Conditional Access outcome. The query follows Microsoft's documented schema and the syntax of its published hunting queries; SOCSimulator has not run it against a live tenant.
One row, field by field
Simulated example generated by SOCSimulator Research. The user, the ISP and the address (from the 203.0.113.0/24 documentation range) are invented; the field names are Microsoft's.
{"TimeGenerated":"2026-10-21T06:42:18Z","UserPrincipalName":"j.ramos@corp.example","ActivityType":"LogOn","ActionType":"Sign-in","SourceIPAddress":"203.0.113.47","SourceIPLocation":"Romania","InvestigationPriority":7,"UsersInsights":{"AccountDisplayName":"Julia Ramos","IsDormantAccount":"False","IsNewAccount":"False","BlastRadius":"Medium"},"DevicesInsights":{"ISP":"Example Hosting SRL","OperatingSystem":"Windows 10","UserAgentFamily":"Chrome","ThreatIntelIndicatorType":"Proxy"},"ActivityInsights":{"FirstTimeUserConnectedFromCountry":"True","CountryUncommonlyConnectedFromAmongPeers":"True","FirstTimeUserConnectedViaISP":"True","ISPUncommonlyUsedAmongPeers":"True","FirstTimeUserConnectedFromDevice":"False","BrowserUncommonlyUsedByUser":"False"}}Read it in this order:
- Priority 7. High enough to look at today. It says the sign-in deviates from her baseline, not that it is malicious.
- Country and ISP. Her first sign-in from Romania in 90 days, a country her peers rarely connect from, through an ISP she has not used in 30 days. Microsoft's walkthrough of an anomalous sign-in lists these same flags among its evidence fields.
- Device and browser.
FirstTimeUserConnectedFromDeviceisFalseand the browser is her usual one. Either she is on her own laptop on an unfamiliar network, or someone has copied enough of her setup to look like her. - Threat intel. The IP carries a proxy indicator. A commercial VPN produces the same tag.
- Blast radius Medium. If the account is compromised, the damage goes beyond one mailbox.
Then join to SigninLogs and check three things: whether MFA was satisfied and by which method, which app she signed into, and what the account did in the next hour.
False positive when she is travelling (HR or the travel system confirms it), when a company or consumer VPN changed her egress point, or when her peers started connecting from the same place too. Microsoft's guidance for impossible travel follows the same path: confirm with the user, check on the user entity page whether the location is among her commonly known locations, then run the Anomalous Geo Location Logon hunting query to see whether her peers connect from there as well.
Escalate when MFA was satisfied by a method registered minutes earlier, when the sign-in is followed by a new inbox rule or a first-time admin action (FirstTimeUserPerformedAction), when the device flag turns True, or when she is badged into the office while "she" signs in from Romania.
Where UEBA fits
UEBA does not replace detection rules. A rule that fires on a known ransomware command line is faster and more precise than waiting for a behavioral score. UEBA covers what rules cannot express: valid credentials used from the wrong place, an insider reading shares their role never needed, a dormant account waking up. In Sentinel it needs no separate license and costs nothing extra, although the tables it creates are billed as ordinary Log Analytics storage. Insider threat cases and impossible travel triage are where you will use it most, and in both you treat the score as a reason to look and the raw sign-in and audit logs as the evidence.
UEBA in SOC Operations
UEBA changes what a tier 1 analyst sorts by. Instead of reading every sign-in, you start from the activities with the highest investigation priority and work out why each one broke the baseline. The skill is explaining the score: which flags fired, how far back each one looked, and whether something ordinary accounts for all of them, such as a trip, a new VPN, a role change or two weeks of leave. When it does, you close the case with that reason written in the notes, so the next analyst does not repeat the work. When it does not, you have a lead that no signature would have produced, usually a valid account in the wrong hands, and the raw sign-in and audit events behind the row become the evidence you escalate with.
Practice UEBA in a Real SOC
SOCSimulator provides hands-on training with realistic SIEM, XDR, and Firewall interfaces. Build real analyst skills investigating ueba scenarios with zero consequences, free.
Frequently Asked Questions
- What does UEBA stand for?
- User and entity behavior analytics. 'User' covers people and service accounts. 'Entity' extends the baselines to devices, IP addresses and applications, so UEBA can flag a device that is new to the whole tenant or a user logging on to a machine they have never used before (FirstTimeUserLoggedOnToDevice in Sentinel). The output is a score per activity that ranks what to investigate, not a verdict.
- How does UEBA work in Microsoft Sentinel?
- You turn it on in the Sentinel settings, choose the identity source (Entra ID, on-premises Active Directory through Defender for Identity, or both) and connect data sources such as sign-in logs, audit logs, Azure Activity and Windows security events. UEBA then writes enriched activity to BehaviorAnalytics with a 0-10 InvestigationPriority, identity data to IdentityInfo and peer groups to UserPeerAnalytics. Microsoft suggests waiting about a week for useful insights. No extra license is needed, but the new tables add storage cost.
- What is user and entity behavior analytics used for?
- Mostly for attacks that use legitimate access: stolen credentials signing in from an unusual place, an insider opening resources their peers never touch, a dormant account suddenly active, or a burst of operations far above the user's norm. None of these trips a malware alert or a signature, so a baseline is what makes them stand out. It also helps triage, because the score ranks which deviations to look at first.
Sources
- Microsoft Learn: Microsoft Sentinel UEBA data sources and schema enrichments (UEBA reference)
- Microsoft Learn: Advanced threat detection with User and Entity Behavior Analytics (UEBA) in Microsoft Sentinel
- Microsoft Learn: Investigate incidents with UEBA data
- Microsoft Learn: Enable User and Entity Behavior Analytics (UEBA) in Microsoft Sentinel
- Azure-Sentinel on GitHub: UEBA Essentials hunting query, Anomalous Geo Location Logon
- Azure-Sentinel on GitHub: UEBA Essentials hunting query, anomalies on VIP users
Related Terms
Security Information and Event Management (SIEM) is a platform that aggregates, normalizes, and corr...
An insider threat is a security risk originating from current or former employees, contractors, or b...
Data Loss Prevention (DLP) is a set of technologies and policies that detect and prevent unauthorize...
Privilege escalation is an attacker gaining rights they were never given, after they already have a ...
Lateral movement is the attack phase where adversaries expand access from an initial foothold to add...
More Tools Terms
Related SOC Training Resources
SOC Analyst (Tier 1) Career Guide: Salary & Skills
Tier 1 SOC Analysts are the front line. You monitor alert queues, triage incoming detections, classify them as true or f…
Read more Career PathSOC Analyst (Tier 2) Career Guide: Salary & Skills
Tier 2 SOC Analysts handle the investigations that Tier 1 escalates. You dig into multi-stage attacks, coordinate contai…
Read more Career PathSecurity Engineer Career Guide: Salary & Skills
Security Engineers build and maintain the infrastructure that SOC analysts depend on. You deploy SIEMs, configure firewa…
Read more ComparisonSOCSimulator vs LetsDefend: Comparison
SOCSimulator wins on operational realism. You get multi-tool shift simulation with SLA pressure, noise injection, and al…
Read more ComparisonSOCSimulator vs Hack The Box: Comparison
Different tools for different career paths. SOCSimulator trains defensive analysts. Hack The Box trains offensive securi…
Read more ToolSIEM Training Console: SOCSimulator
The SIEM console in SOCSimulator replicates the workflow of enterprise platforms like Splunk Enterprise Security, Micros…
Read more ToolXDR Training Console: SOCSimulator
The XDR console in SOCSimulator replicates the investigation workflow of platforms like CrowdStrike Falcon, Microsoft De…
Read more TechniqueMITRE ATT&CK® Techniques: Detection Training Library
Browse all MITRE ATT&CK® techniques with detection strategies and example alerts.
Read more Career PathCybersecurity Career Paths: 2026 Guide
Explore SOC analyst career paths with salary data, required skills, and certification roadmaps.
Read more PlaybookSOC Investigation Playbooks: Step-by-Step Guides
Practitioner investigation playbooks with decision trees and real SIEM queries.
Read more FeatureShift Mode: Real-Time SOC Simulation
Practice alert triage under realistic time pressure with SLA timers and noise injection.
Read more FeatureOperations: Guided Training Operations
Structured CTF-style investigation operations covering real-world attack scenarios.
Read more