Query Details
union SigninLogs,AADNonInteractiveUserSignInLogs //| where TimeGenerated > ago(30d) | where isnotempty(UserAgent) | extend UserAgentDetail = todynamic(parse_user_agent(UserAgent, "browser")) | extend UserAgentFamily = tostring(parse_json(tostring(UserAgentDetail.Browser)).Family) | extend UserAgentMajorVersion = toint(parse_json(tostring(UserAgentDetail.Browser)).MajorVersion) //| summarize count() by UserAgent
This query is designed to analyze user sign-in logs by examining the user agents involved. Here's a simple breakdown of what it does:
Combine Data: It starts by combining data from two sources: SigninLogs and AADNonInteractiveUserSignInLogs.
Filter Non-Empty User Agents: It filters the combined data to only include entries where the UserAgent field is not empty. This ensures that only records with user agent information are considered.
Extract User Agent Details:
parse_user_agent function to analyze the UserAgent string and extract detailed information about the browser.UserAgentDetail.Extract Specific User Agent Information:
UserAgentDetail and stores it in a new column called UserAgentFamily.UserAgentMajorVersion.Commented Out Parts:
//| where TimeGenerated > ago(30d) is commented out, which means it is not currently filtering the data to only include entries from the last 30 days.//| summarize count() by UserAgent is also commented out, which means it is not currently summarizing the data by counting the number of occurrences of each user agent.In summary, the query processes sign-in logs to extract and organize information about the browsers used during sign-ins, but it does not currently limit the data to the last 30 days or provide a summary count of user agents.

Jay Kerai
Released: February 26, 2025
Tables
Keywords
Operators