#Why this matters
Many organizations pair on-premises servers with cloud identity providers like Microsoft Entra ID. Microsoft Sentinel ingests both cloud and endpoint telemetry into an Azure Monitor Log Analytics workspace, giving analysts one place to correlate sign-ins, directory changes, and host activity.
When an alert fires for an unfamiliar sign-in or impossible travel, opening the incident in Sentinel is only step one. To decide in minutes whether an employee simply connected over a hotel Wi-Fi hotspot or an attacker hijacked their account, you need fluent Kusto Query Language (KQL) skills to inspect the raw evidence and pivot across tables.
#Sentinel architecture and key tables
Data Connectors stream telemetry into structured tables inside a Log Analytics workspace. Scheduled Analytics Rules run KQL queries over those tables and group matching alerts and entities (users, hosts, IP addresses) into incidents.
Note the naming trap: Azure KQL (Kusto Query Language) is a full piped analytics language similar in power to Splunk SPL, whereas Kibana's KQL (covered in the previous lesson) is a filter-only search bar syntax.
| Sentinel table | Telemetry source | Key columns for triage |
|---|---|---|
SigninLogs |
Entra ID user sign-ins | TimeGenerated, UserPrincipalName, IPAddress, ResultType, LocationDetails, AppDisplayName |
AuditLogs |
Entra ID directory changes | TimeGenerated, OperationName, Category, InitiatedBy, TargetResources |
SecurityEvent |
Windows Security Event Log | TimeGenerated, EventID, Account, Computer, IpAddress, LogonType |
Syslog |
Linux and network appliances | TimeGenerated, Computer, ProcessName, SyslogMessage |
CommonSecurityLog |
CEF firewalls and proxies | TimeGenerated, SourceIP, DestinationIP, DeviceAction, RequestURL |
#Triage queries in Kusto Query Language
Every KQL query starts with a table name and pipes data downward through tabular operators (|). Filtering on TimeGenerated first shrinks the scanned partitions immediately, keeping triage queries fast.
Essential KQL habits for SOC triage:
- Use
hasinstead ofcontains:haslooks up whole indexed words (tokens) and runs orders of magnitude faster thancontains, which scans every character of a string. - Know case sensitivity:
==andhasdiffer in case behavior (==is case-sensitive in KQL, while=~is case-insensitive;hasis case-insensitive). For usernames or hostnames, prefer=~ortolower(). - Extract nested JSON with
extend: fields likeLocationDetailsaredynamicobjects, soextend Country = tostring(LocationDetails.countryOrRegion)pulls out a flat string column for grouping.
The KQL query below hunts Entra ID accounts experiencing multiple failed sign-ins followed by at least one success in the past 24 hours. In SigninLogs, ResultType == "0" indicates success, while "50126" indicates an invalid username or password:
SigninLogs
| where TimeGenerated > ago(24h)
| extend Country = tostring(LocationDetails.countryOrRegion)
| summarize
TotalAttempts = count(),
FailedCount = countif(ResultType != "0"),
SuccessCount = countif(ResultType == "0"),
Countries = make_set(Country),
IPs = make_set(IPAddress)
by UserPrincipalName, AppDisplayName
| where FailedCount >= 5 and SuccessCount >= 1
| order by FailedCount descHere countif() counts successes and failures inside a single pass, and make_set() builds a deduplicated array of countries and source IPs for quick analyst inspection.
#Pivoting from alert to incident scope
A suspicious sign-in in SigninLogs rarely tells the whole story on its own. Once you spot a questionable login, pivot by UserPrincipalName or IPAddress into AuditLogs to check whether the actor established persistence (for example, registering a new MFA method or adding an application credential), and into SecurityEvent if the user also accesses on-premises servers.
#Common mistakes
- Scanning without a time filter: omitting
where TimeGenerated > ago(...)forces Log Analytics to scan the full retention period, slowing down triage and risking query timeouts. - Using
containson high-volume tables:where SyslogMessage contains "failed"bypasses token indexes. Usehas(where SyslogMessage has "failed") whenever matching complete words or IP tokens. - Case-sensitive
==mismatches: comparingUserPrincipalName == "Alice@example.test"misses"alice@example.test". Use=~for case-insensitive exact comparisons. - Stopping at
SigninLogs: assuming a successful MFA prompt means an alert is benign ignores cases where attackers steal session cookies or register their own MFA device immediately after first access. Always verifyAuditLogs.
#Summary
- Microsoft Sentinel stores normalized cloud and endpoint logs inside Log Analytics tables such as
SigninLogs,AuditLogs,SecurityEvent,Syslog, andCommonSecurityLog. - Kusto Query Language (KQL) pipes data from early
where TimeGeneratedfilters throughextend,summarize(countif,dcount,make_set),project, andorder by. - Token-indexed operators (
has) and case-aware equality (=~) keep queries fast and accurate under pressure. - Effective cloud triage always pivots from suspicious
SigninLogsevents intoAuditLogsto uncover persistence actions like unauthorized MFA registrations.