Query Details
// Show Devices for which the option “Locate Device“ was used. IntuneAuditLogs | where OperationName has "locateDevice" | extend User = tostring(todynamic(Properties).Actor.UPN) | extend DeviceId = tostring(todynamic(Properties).TargetObjectIds[0]) | join kind=leftouter IntuneDevices on DeviceId // DeviceName from IntuneDevices | distinct TimeGenerated, User, DeviceName | sort by TimeGenerated desc
This query is pulling data from the IntuneAuditLogs to find instances where the "Locate Device" operation was used. It then extracts the user and device ID associated with each of these instances. It then joins this data with the IntuneDevices data, matching on the device ID. The result is a list of unique instances (based on the time they were generated, the user, and the device name) where the "Locate Device" operation was used, sorted in descending order by the time they were generated.

Ugur Koc
Released: July 25, 2022
Tables
Keywords
Operators