Query Details
DeviceNetworkInfo | where ConnectedNetworks != "" | extend NetworkName = tostring(parse_json(ConnectedNetworks)[0]["Name"]) //| where NetworkName !contains "Company WiFi" // your corporate network | distinct DeviceName, NetworkName | sort by NetworkName asc
This query retrieves information about devices and their connected networks. It filters out devices that are not connected to any network. It then adds a new column called NetworkName, which contains the name of the first connected network for each device. The query then removes any duplicate device and network combinations. Finally, the results are sorted in ascending order based on the network name.

C.J. May
Released: May 16, 2023
Tables
Keywords
Operators