Most learners think…
Most people think 'Sentinel detection' means downloading a pile of ready-made rules and switching them on. That gets you noise, not security — and it falls apart the moment an interviewer asks you to write a detection.
Real detection is a skill stack: KQL is the language you query logs with, an analytics rule is the schedule + threshold that turns a query into alerts, entity mapping and MITRE ATT&CK turn those alerts into an investigable incident, and hunting plus UEBA catch what no rule wrote yet. Understand that chain and you can build a detection, tune it, and explain scheduled vs NRT without blinking.
① KQL basics — the language you detect with
Every Sentinel detection starts as a KQL query against a table of logs (for example SigninLogs or SecurityEvent). KQL reads top-to-bottom and you chain steps with the pipe |. Six operators cover most security work. where filters rows; project picks columns; summarize aggregates (count failures per user); and join correlates two tables (sign-ins with risky IPs).
Two more you will use daily
parse pulls fields out of a messy string column, and bin() rounds timestamps into buckets so you can count events per 5-minute or 1-hour window. A classic brute-force detection is just: filter to failed sign-ins, summarize the count by user and bin(TimeGenerated, 1h), then where that count > 10. That single query is a detection waiting for a rule.
Put your where clauses as high in the pipeline as possible so KQL throws away rows before doing expensive work, and use project (or summarize) to keep only the columns you actually need. A tight query is both faster and cheaper — Sentinel bills on data scanned.
You want failed sign-ins counted per user per hour. Which KQL fragment fits?
② Analytics rule types — turning a query into detections
A query only detects when it lives inside an analytics rule. Sentinel has four main types. A Scheduled rule is by far the most common: it runs your KQL on a timer (interval and lookback are both configurable from 5 minutes to 14 days) and raises an alert when results pass a threshold. A NRT (near-real-time) rule is a limited scheduled rule hard-coded to run every minute for the fastest detection, with a short two-minute delay; it always alerts (no threshold) and is capped at 50 enabled rules.
The other two
Microsoft security rules don't run KQL — they turn alerts from Microsoft Defender products into Sentinel incidents automatically. Anomaly / ML rules use machine learning to baseline behaviour and flag outliers; anomaly rules write to the Anomalies table rather than raising their own alerts, so you use them as enrichment. The interview line: scheduled = flexible timer with a threshold; NRT = every minute, always fires, fewer features.
The aggregation workhorse — count(), dcount(), make_list() grouped by columns and bin(time). Most detections end in a summarize + where threshold.
KQL on a configurable timer (5 min–14 days) with a result threshold. The default, full-featured detection type — up to 512 enabled.
A scheduled rule pinned to run every minute with a two-minute delay. Always fires, fewer features, capped at 50 — use for time-critical detections.
Maps query columns (user, host, IP) to Sentinel entities so alerts correlate across rules and build an investigation graph. Up to 10 per rule.
Importing every analytics template and enabling it is how SOCs drown. Enable rules that match your data sources, start broad ones in a low-severity/monitoring posture, tune the threshold and entity mapping, then raise severity. An untuned rule with no aggregation is a false-positive machine.
What best describes an NRT rule versus a scheduled rule?
③ From match to incident — alerts, entities and MITRE
When a rule's query returns matching rows, the rule raises an alert. Two enrichment steps decide whether that alert is useful. Entity mapping ties query columns to recognised entities — Account, Host, IP, URL, File hash — so the same user or IP can be correlated across different rules and data sources. You can map up to 10 entities per rule, each with up to three identifiers; stronger identifiers give better correlation.
You also tag the rule with MITRE ATT&CK tactics and techniques, which flow into the incident and onto the coverage matrix so you can see gaps. Finally, alert grouping rolls related alerts into a single incident — the unit the SOC actually investigates. One tuned rule should produce one clear incident, not fifty duplicate alerts.
Never close a Sentinel incident on a hunch. The incident shows the mapped entities (who, which host, which IP), the MITRE tactic, and the custom details from the query. That single read usually tells you if it is a true positive — no guessing required.
▶ Watch a brute-force attempt become a tuned incident
How one KQL detection runs end-to-end. Press Play for the healthy path, then Break it to see the classic failure.
Why does mapping a username column to the Account entity matter?
④ Hunting & UEBA — catching what no rule wrote
Rules catch the known; hunting catches the suspected. The Hunting page ships KQL hunting queries grouped by MITRE tactic; you run them, sort by result spikes, and when a row looks bad you save it as a bookmark — it preserves the query, the row, your notes, and inherits the query's entity and MITRE mappings. Promote a serious bookmark straight to an incident.
Watchlists and UEBA
Watchlists are reference data (VIP accounts, terminated employees, known-bad IPs) you join into queries to enrich detections or suppress noise. UEBA (User and Entity Behavior Analytics) baselines normal behaviour per user and host and surfaces anomalies and rich entity pages; the 2026 UEBA behaviours layer even summarises raw logs into plain-language, MITRE-mapped behaviours. Together they turn a pile of logs into a story an analyst can read.
Vikram, a SOC analyst at a Pune fintech, faces this
A new scheduled rule for failed logins fires hundreds of near-identical alerts an hour and the SOC queue is unusable.
The KQL has no aggregation — it alerts on every single failed-logon row — and no entity mapping, so alerts never group.
Open the rule: the query is just a where filter with no summarize, the threshold is 0, and Account/IP are not mapped, so each event becomes its own alert.
Sentinel ▸ Configuration ▸ Analytics ▸ (rule) ▸ Set rule logicRewrite to summarize count() by Account, bin(TimeGenerated, 1h); set the threshold to >10; map Account and IP entities; enable alert grouping so related alerts roll into one incident.
Re-run: instead of hundreds of alerts you get one incident per noisy account, with the user and source IP visible on the graph.
During a hunt you spot a suspicious sign-in row and want to keep it for the investigation. What do you do?
🤖 Ask the AI Tutor
Tap any question — instant, scoped to this lesson. No login, no waiting.
Pre-curated from vendor docs + community Q&A, scoped to this lesson. For a live prod issue, paste your export into chat.techclick.in.
📝 Wrap-up assessment — six more
You've answered 4 inline. Six left. 70% (7 of 10) marks the lesson complete on your profile. Tap Submit all answers at the end.
🧠 In your own words
Type one line: why is Sentinel detection called 'KQL plus rules' rather than 'a list of alerts'? Then compare with the expert version.
🗣 Teach a friend
Best way to lock it in — explain it in one line to a teammate. Tap to generate a paste-ready summary.
📖 Glossary
- KQL (Kusto Query Language)
- The read-only query language for Sentinel logs; you pipe operators (where, project, summarize, join, parse, bin) to filter and aggregate data.
- summarize
- The KQL aggregation operator — count(), dcount(), make_list() grouped by columns and bin(time) — that turns raw rows into detections.
- Scheduled rule
- An analytics rule that runs KQL on a configurable timer (5 min to 14 days) and alerts when results pass a threshold; the default detection type.
- NRT rule
- Near-real-time rule: a limited scheduled rule that runs every minute with a two-minute delay, always alerts, and is capped at 50 enabled rules.
- Microsoft security rule
- A rule that automatically creates Sentinel incidents from alerts raised by Microsoft Defender products, rather than running KQL.
- Anomaly / ML rule
- A machine-learning rule that baselines behaviour and flags outliers; anomaly results land in the Anomalies table to enrich detections.
- Entity mapping
- Tying query columns to recognised entities (Account, Host, IP, URL) so alerts correlate across rules and build an investigation graph; up to 10 per rule.
- MITRE ATT&CK mapping
- Tagging rules, hunts and bookmarks with tactics and techniques so incidents carry context and the coverage matrix shows detection gaps.
- Watchlist
- Reference data (VIPs, terminated staff, known-bad IPs) stored in the Watchlist table and joined into queries to enrich detections or suppress noise.
- UEBA
- User and Entity Behavior Analytics — baselines normal behaviour, surfaces anomalies and entity pages; the 2026 behaviours layer narrates raw logs in plain language.
📚 Sources
- Microsoft Learn — Threat detection in Microsoft Sentinel (analytics rule types: scheduled, NRT, anomaly, Microsoft security, Fusion). learn.microsoft.com/azure/sentinel/threat-detection
- Microsoft Learn — Scheduled analytics rules in Microsoft Sentinel (query scheduling, 5 min–14 days, entity mapping). learn.microsoft.com/azure/sentinel/scheduled-rules-overview
- Microsoft Learn — Quick threat detection with near-real-time (NRT) analytics rules. learn.microsoft.com/azure/sentinel/near-real-time-rules
- Microsoft Learn — Map data fields to entities in Microsoft Sentinel. learn.microsoft.com/azure/sentinel/map-data-fields-to-entities
- Microsoft Learn — Threat hunting and bookmarks in Microsoft Sentinel. learn.microsoft.com/azure/sentinel/hunting
- Microsoft Learn — Watchlists and User and Entity Behavior Analytics (UEBA) in Microsoft Sentinel. learn.microsoft.com/azure/sentinel/watchlists
What's next?
Got detection? Next, go deep on the SOAR side — automation rules, playbooks and incident response — so a high-confidence alert can trigger an automatic containment, not just a ticket.