Interactive Web Login
Query
//Logging into a website/interactive login
SigninLogs
| where IsInteractive == 1
| extend City = LocationDetails.city
| extend State = LocationDetails.state
| extend Lat = parse_json(tostring(LocationDetails.geoCoordinates)).latitude
| extend Long = parse_json(tostring(LocationDetails.geoCoordinates)).longitude
| project UserPrincipalName, UserType, AppDisplayName, ResourceDisplayName, City, State, Location, Lat, LongExplanation
This query is designed to filter and display information about interactive sign-ins to a website. Here's a breakdown of what it does:
-
Data Source: It starts with the
SigninLogstable, which contains records of sign-in activities. -
Filter: It filters the records to only include those where the sign-in was interactive, indicated by
IsInteractive == 1. -
Extract Location Details:
- It extracts the city and state from the
LocationDetailsfield. - It also extracts the latitude and longitude by parsing the
geoCoordinatesfromLocationDetails.
- It extracts the city and state from the
-
Select Specific Fields: Finally, it selects and displays a set of fields for each filtered record:
UserPrincipalName: The user's principal name (often their email or username).UserType: The type of user (e.g., member, guest).AppDisplayName: The name of the application the user signed into.ResourceDisplayName: The name of the resource accessed.CityandState: The city and state from which the sign-in occurred.Location: The original location details.LatandLong: The latitude and longitude coordinates of the sign-in location.
In summary, this query retrieves and displays information about interactive sign-ins, including user details and geographical location data.
Details

Rod Trent
Released: September 13, 2024
Tables
SigninLogs
Keywords
SigninLogsUserPrincipalNameUserTypeAppDisplayNameResourceDisplayNameCityStateLocationLatLong
Operators
SigninLogswhereextendparse_jsontostringproject