Level 1 · Read the logs · Mission 3 of 5 · by Kaushik Saha
Newest first
Alert A user reports a strange sign-in prompt · Idea sort · top
Commands here project · where · != · top · all commands
Briefing
Rows come back in no particular order. To see what happened last, put them in time order.
One idea: sort orders the rows, top keeps the first few
SigninLogs
| where ResultType != "0"
| top 10 by TimeGenerated desc
| project TimeGenerated, UserPrincipalName, IPAddress, ResultType
Result on the sample · 10 rows
| TimeGenerated | UserPrincipalName | IPAddress | ResultType |
|---|---|---|---|
| 2026-06-10 11:02:00 | sara.lind@contoso.com | 192.0.2.20 | 50140 |
| 2026-06-10 10:18:00 | mei.chen@contoso.com | 192.0.2.10 | 50074 |
| 2026-06-10 09:47:12 | ben.carter@contoso.com | 192.0.2.20 | 50126 |
| 2026-06-10 09:05:00 | tom.becker@contoso.com | 192.0.2.20 | 50140 |
| 2026-06-10 08:31:00 | priya.nair@contoso.com | 192.0.2.10 | 50074 |
| 2026-06-10 08:20:09 | alex.morgan@contoso.com | 203.0.113.45 | 500121 |
| 2026-06-10 08:19:44 | alex.morgan@contoso.com | 203.0.113.45 | 500121 |
| 2026-06-10 08:19:12 | alex.morgan@contoso.com | 203.0.113.45 | 50126 |
| 2026-06-10 08:18:41 | alex.morgan@contoso.com | 203.0.113.45 | 50126 |
| 2026-06-10 08:17:05 | alex.morgan@contoso.com | 203.0.113.45 | 50126 |
top 10 by TimeGenerated desc is the same as sort by TimeGenerated desc followed by take 10: the ten newest.
desc means newest first; asc means oldest first.
Your turn
Show the five oldest failures of the day, oldest first.
Write it in the box below and check it. Then compare with one answer; others can be right too.
Show one answer
SigninLogs
| where ResultType != "0"
| top 5 by TimeGenerated asc
| project TimeGenerated, UserPrincipalName, IPAddress, ResultType
Result on the sample · 5 rows
| TimeGenerated | UserPrincipalName | IPAddress | ResultType |
|---|---|---|---|
| 2026-06-10 07:40:11 | alex.morgan@contoso.com | 198.51.100.23 | 50126 |
| 2026-06-10 07:40:48 | priya.nair@contoso.com | 198.51.100.23 | 50126 |
| 2026-06-10 07:41:25 | sam.okafor@contoso.com | 198.51.100.23 | 50126 |
| 2026-06-10 07:42:02 | mei.chen@contoso.com | 198.51.100.23 | 50126 |
| 2026-06-10 07:42:39 | omar.haddad@contoso.com | 198.51.100.23 | 50126 |
Check your own query
Write your query for the task above and check it against the real schema.
Debrief
The newest failures are everyday: MFA prompts, a "stay signed in?" and one mistyped password. Just before them,
around 08:20, one user has two 500121 failures after a run of wrong passwords: the password was finally right, and
the MFA prompt was denied. That user is Alex Morgan. Next, follow Alex.
All data on this page is sample data, made up for this course. The IP addresses come from ranges reserved for documentation, and the people and the company are fictional.
Mission by Kaushik Saha. Every query checked with Microsoft.Azure.Kusto.Language 12.4.1 against schema bundle 2026.10.29; every result computed on the course's sample with Kusto-Loco 1.4.9, an open-source KQL engine (credits). The story's clock reads 12:00 UTC on 10 June 2026.