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
Result on the sample · 5 rows
| TimeGenerated | UserPrincipalName | AppDisplayName | IPAddress | ResultType |
|---|---|---|---|---|
| 2026-06-10 07:45:44 | raj.patel@contoso.com | Office 365 Exchange Online | 198.51.100.23 | 50126 |
| 2026-06-10 08:28:33 | mei.chen@contoso.com | My Apps | 192.0.2.10 | 0 |
| 2026-06-10 09:40:23 | omar.haddad@contoso.com | My Apps | 192.0.2.34 | 0 |
| 2026-06-10 09:31:09 | julia.santos@contoso.com | Office 365 SharePoint Online | 192.0.2.10 | 0 |
| 2026-06-10 08:03:58 | mei.chen@contoso.com | Office 365 Exchange Online | 192.0.2.10 | 0 |
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
Result on the sample · 10 rows
| TimeGenerated | UserPrincipalName | Location | AppDisplayName |
|---|---|---|---|
| 2026-06-10 07:45:44 | raj.patel@contoso.com | DE | Office 365 Exchange Online |
| 2026-06-10 08:28:33 | mei.chen@contoso.com | US | My Apps |
| 2026-06-10 09:40:23 | omar.haddad@contoso.com | US | My Apps |
| 2026-06-10 09:31:09 | julia.santos@contoso.com | US | Office 365 SharePoint Online |
| 2026-06-10 08:03:58 | mei.chen@contoso.com | US | Office 365 Exchange Online |
| 2026-06-10 08:29:37 | priya.nair@contoso.com | US | Office 365 Exchange Online |
| 2026-06-10 07:46:26 | mei.chen@contoso.com | US | Microsoft Teams |
| 2026-06-10 10:13:45 | julia.santos@contoso.com | US | Microsoft Teams |
| 2026-06-10 07:43:53 | lena.fischer@contoso.com | DE | Office 365 Exchange Online |
| 2026-06-10 10:08:59 | priya.nair@contoso.com | US | Office 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.