Impossible Travel - Non-Interactive Sign-Ins from Multiple Countries
17 Impossible Travel Multiple Countries
Query
AADNonInteractiveUserSignInLogs
| where TimeGenerated > ago(1h)
| where ResultType == 0
| summarize
Countries = make_set(Location),
CountryCount = dcount(Location),
IPs = make_set(IPAddress),
Apps = make_set(AppDisplayName),
FirstSeen = min(TimeGenerated),
LastSeen = max(TimeGenerated)
by UserPrincipalName
| where CountryCount >= 4
| extend IPAddress = tostring(IPs[0])
| order by CountryCount descExplanation
This query is designed to detect suspicious activity related to user sign-ins. Specifically, it looks for cases where a user successfully logs in from four or more different countries within a one-hour period. This is considered highly unusual and likely indicates that the user's authentication tokens have been stolen and are being used by attackers from multiple locations.
Here's a simple breakdown of what the query does:
-
Data Source: It uses logs from Azure Active Directory that track non-interactive user sign-ins.
-
Time Frame: It examines sign-in attempts that occurred in the last hour.
-
Successful Logins: It filters for only successful sign-ins (where the result type is 0).
-
Country Count: It groups the data by user and counts the number of distinct countries from which the user has logged in.
-
Alert Condition: If a user has logged in from four or more different countries within the hour, it triggers an alert.
-
Details Captured: For each alert, it captures the list of countries, IP addresses, applications used, and the time range of the logins.
-
Alert Description: The alert is labeled as "Impossible Travel" and includes details about the user and the countries involved.
-
Incident Management: If such an event is detected, an incident is created for further investigation.
This query helps identify potential security breaches where attackers might be using stolen credentials to access a user's account from various global locations simultaneously.
Details

David Alonso
Released: July 16, 2026
Tables
Keywords
Operators
Severity
MediumTactics
Frequency: 1h
Period: 1h