VeriKQL by Kaushik Saha

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

Meet SigninLogs

Alert A user reports a strange sign-in prompt · Idea take · project

Commands here take · project · all commands

Briefing

It's 12:00 UTC on Wednesday 10 June, and you're on the SOC shift at Contoso. A ticket arrives from Alex Morgan in Finance: "My phone kept asking me to approve sign-ins this morning, and I wasn't signing in."

Every sign-in to Microsoft Entra ID is a row in SigninLogs. Before chasing anything, look at the table.

One idea: look at a few rows, and only the columns you need

A KQL query starts with a table, and each | passes the rows to the next step. project keeps the columns you name, and take shows a few rows.

SigninLogs
| project TimeGenerated, UserPrincipalName, AppDisplayName, IPAddress, ResultType
| take 5
✓ Verified by VeriKQLKusto.Language 12.4.1 · bundle 2026.10.29

Result on the sample · 5 rows

TimeGeneratedUserPrincipalNameAppDisplayNameIPAddressResultType
2026-06-10 07:45:44raj.patel@contoso.comOffice 365 Exchange Online198.51.100.2350126
2026-06-10 08:28:33mei.chen@contoso.comMy Apps192.0.2.100
2026-06-10 09:40:23omar.haddad@contoso.comMy Apps192.0.2.340
2026-06-10 09:31:09julia.santos@contoso.comOffice 365 SharePoint Online192.0.2.100
2026-06-10 08:03:58mei.chen@contoso.comOffice 365 Exchange Online192.0.2.100

Five columns you'll use in every level:

  • TimeGenerated: when the sign-in happened, in UTC.
  • UserPrincipalName: who signed in, as an email-style name.
  • AppDisplayName: what they signed in to.
  • IPAddress: where the sign-in came from.
  • ResultType: "0" for a success; anything else is an error code.

Your turn

Show 10 sign-ins with the time, the user, the country (Location) and the app.

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

Show one answer
SigninLogs
| project TimeGenerated, UserPrincipalName, Location, AppDisplayName
| take 10
✓ Verified by VeriKQLKusto.Language 12.4.1 · bundle 2026.10.29

Result on the sample · 10 rows

TimeGeneratedUserPrincipalNameLocationAppDisplayName
2026-06-10 07:45:44raj.patel@contoso.comDEOffice 365 Exchange Online
2026-06-10 08:28:33mei.chen@contoso.comUSMy Apps
2026-06-10 09:40:23omar.haddad@contoso.comUSMy Apps
2026-06-10 09:31:09julia.santos@contoso.comUSOffice 365 SharePoint Online
2026-06-10 08:03:58mei.chen@contoso.comUSOffice 365 Exchange Online
2026-06-10 08:29:37priya.nair@contoso.comUSOffice 365 Exchange Online
2026-06-10 07:46:26mei.chen@contoso.comUSMicrosoft Teams
2026-06-10 10:13:45julia.santos@contoso.comUSMicrosoft Teams
2026-06-10 07:43:53lena.fischer@contoso.comDEOffice 365 Exchange Online
2026-06-10 10:08:59priya.nair@contoso.comUSOffice 365 Exchange Online

Check your own query

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

Debrief

You can now look inside a table and choose its columns. Next, keep only the rows that matter: the failures.

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.