VeriKQL by Kaushik Saha

Level 1 · Read the logs · Mission 4 of 5 · by Kaushik Saha

Follow one user

Alert A user reports a strange sign-in prompt · Idea == · has

Commands here project · where · == · and / or · has · sort by · all commands

Briefing

Alex Morgan works in the Seattle office. Pull every sign-in for Alex, in order, and see where they came from.

One idea: == matches one exact value

SigninLogs
| where UserPrincipalName == "alex.morgan@contoso.com"
| sort by TimeGenerated asc
| project TimeGenerated, IPAddress, Location, AppDisplayName, ResultType
✓ Verified by VeriKQLKusto.Language 12.4.1 · bundle 2026.10.29

Result on the sample · 16 rows

TimeGeneratedIPAddressLocationAppDisplayNameResultType
2026-06-10 07:40:11198.51.100.23DEOffice 365 Exchange Online50126
2026-06-10 07:56:42192.0.2.10USMicrosoft Teams0
2026-06-10 08:12:33192.0.2.10USOffice 365 Exchange Online0
2026-06-10 08:14:02203.0.113.45NLOffice 365 Exchange Online50126
2026-06-10 08:15:10203.0.113.45NLOffice 365 Exchange Online50126
2026-06-10 08:16:31203.0.113.45NLOffice 365 Exchange Online50126
2026-06-10 08:17:05203.0.113.45NLOffice 365 Exchange Online50126
2026-06-10 08:18:41203.0.113.45NLOffice 365 Exchange Online50126
2026-06-10 08:19:12203.0.113.45NLOffice 365 Exchange Online50126
2026-06-10 08:19:44203.0.113.45NLOffice 365 Exchange Online500121
2026-06-10 08:20:09203.0.113.45NLOffice 365 Exchange Online500121
2026-06-10 08:20:36203.0.113.45NLOffice 365 Exchange Online0
2026-06-10 08:24:10203.0.113.45NLMicrosoft Graph PowerShell0
2026-06-10 09:02:41203.0.113.45NLAzure Portal0
2026-06-10 09:08:19203.0.113.77NLOffice 365 SharePoint Online0
2026-06-10 09:58:44203.0.113.77NLAzure Storage0

Read it top to bottom. At 07:40, one wrong password from 198.51.100.23 in Germany: keep that in mind. Then Alex signs in from the office (192.0.2.10, US) until 08:12. Then, from 203.0.113.45 in the Netherlands: six wrong passwords, two denied MFA prompts, and a success at 08:20:36. After that, the same account opens PowerShell, the Azure portal, SharePoint and Storage.

has finds a whole word inside a value, which is handy for app names:

SigninLogs
| where UserPrincipalName == "alex.morgan@contoso.com" and AppDisplayName has "PowerShell"
| project TimeGenerated, IPAddress, AppDisplayName
✓ Verified by VeriKQLKusto.Language 12.4.1 · bundle 2026.10.29

Result on the sample · 1 row

TimeGeneratedIPAddressAppDisplayName
2026-06-10 08:24:10203.0.113.45Microsoft Graph PowerShell

Your turn

Show every sign-in to an app with "Azure" in its name, oldest first, with the time, the user, the app and the address.

Write it in the box below and check it. Then compare with one answer; others can be right too.

Show one answer
SigninLogs
| where AppDisplayName has "Azure"
| sort by TimeGenerated asc
| project TimeGenerated, UserPrincipalName, AppDisplayName, IPAddress
✓ Verified by VeriKQLKusto.Language 12.4.1 · bundle 2026.10.29

Result on the sample · 5 rows

TimeGeneratedUserPrincipalNameAppDisplayNameIPAddress
2026-06-10 09:02:41alex.morgan@contoso.comAzure Portal203.0.113.45
2026-06-10 09:06:33it.admin@contoso.comAzure Portal192.0.2.10
2026-06-10 09:58:44alex.morgan@contoso.comAzure Storage203.0.113.77
2026-06-10 10:29:10it.admin@contoso.comAzure Portal192.0.2.10
2026-06-10 11:47:01it.admin@contoso.comAzure Portal192.0.2.10

Check your own query

Write your query for the task above and check it against the real schema.

Debrief

You have the first thread: someone guessed Alex's password from 203.0.113.45, pushed MFA prompts until one was approved, and got in at 08:20. One level left: prove you can fix a broken query.

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.