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 logins to a website. Here's a simple breakdown:
- SigninLogs: Start with the log data that contains sign-in information.
- | where IsInteractive == 1: Filter the logs to include only interactive logins (those where a user actively logs in, as opposed to automated or background logins).
- | extend City = LocationDetails.city: Add a new column named "City" that contains the city information from the location details.
- | extend State = LocationDetails.state: Add a new column named "State" that contains the state information from the location details.
- | extend Lat = parse_json(tostring(LocationDetails.geoCoordinates)).latitude: Add a new column named "Lat" that contains the latitude from the geo-coordinates.
- | extend Long = parse_json(tostring(LocationDetails.geoCoordinates)).longitude: Add a new column named "Long" that contains the longitude from the geo-coordinates.
- | project UserPrincipalName, UserType, AppDisplayName, ResourceDisplayName, City, State, Location, Lat, Long: Select and display only the specified columns: UserPrincipalName, UserType, AppDisplayName, ResourceDisplayName, City, State, Location, Lat, and Long.
In summary, this query filters for interactive logins and extracts specific location details (city, state, latitude, and longitude) along with user and application information, then displays these selected columns.
Details

Rod Trent
Released: September 13, 2024
Tables
SigninLogs
Keywords
SigninLogsUserLocation
Operators
SigninLogs|where==1extend=.citystateparse_jsontostringgeoCoordinateslatitudelongitudeprojectUserPrincipalNameUserTypeAppDisplayNameResourceDisplayNameLocationLatLong