What is KQL (Kusto Query Language)?
KQL is Microsoft's read-only query language for logs and telemetry, used in Microsoft Sentinel, Defender, Azure Monitor, and Azure Data Explorer.
Definition
KQL
Also called Kusto Query Language, Kusto
KQL (Kusto Query Language) is Microsoft's read-only query language for exploring logs and telemetry, written as a sequence of operators piped from one to the next, and used in Microsoft Sentinel, Azure Monitor, and Azure Data Explorer.
How it works
Microsoft's overview defines a Kusto query as a read-only request to process data and return results, stated in plain text using a data-flow model. Data is organized in databases, tables, and columns, as in SQL. A query starts from a table and passes rows through operators separated by the pipe character, each one filtering, reshaping, or summarizing what it receives, so operator order affects both results and performance.
Common operators include where, project, summarize, extend, join, sort, and take, plus functions for time series, parsing, and text search. Microsoft notes that KQL is the language for working with data in Microsoft Sentinel, and its tutorial lists Azure Data Explorer, Azure Monitor Log Analytics, and Sentinel as places it runs.
Example
A Sentinel analytics rule that counts failed Entra ID sign-ins per user and IP address over the last hour and keeps only heavy hitters:
SigninLogs
| where TimeGenerated > ago(1h)
| where ResultType != "0"
| summarize FailedSignIns = count() by UserPrincipalName, IPAddress
| where FailedSignIns > 20
| sort by FailedSignIns desc
Why it matters for a SOC
For teams on Microsoft's security stack, KQL is how detections, hunting queries, workbooks, and investigations are written, so fluency in it is a core analyst and detection engineering skill. Its pipeline style is approachable, but it is still a platform-specific language: rules written in KQL don't run elsewhere without translation. Teams that want portability often author in Sigma and convert, and teams moving between platforms face rewriting rules from KQL to SPL or the reverse.
Related terms
- SPLSPL (Search Processing Language) is Splunk's query language, made of search commands chained with pipes that retrieve events from indexes and then filter, transform, and aggregate them.
- SIEMA SIEM (security information and event management) system collects security logs from across an organization, stores them in one searchable place, and runs detection rules over them so a security team can find, investigate, and respond to threats.
- Sigma rulesSigma is an open, vendor-neutral format for writing detection rules for log data in YAML, so a rule can be written once, shared, and converted into the query language of whichever SIEM or log platform a team uses.
- Detection engineeringDetection engineering is the practice of designing, building, testing, deploying, and maintaining the rules and analytics that turn security telemetry into alerts, treated with the rigor of software engineering.
Go deeper
FAQ
- Is KQL the same as SQL?
- No. KQL organizes data in databases, tables, and columns like SQL, but queries read top to bottom as a pipeline of operators rather than as a single SELECT statement, and KQL queries are read-only.
Sources
- Kusto Query Language (KQL) overview | Microsoft Learn · accessed November 16, 2026
- Tutorial: Learn common Kusto Query Language operators | Microsoft Learn · accessed November 16, 2026
