Device Stale Device
Query
Description:
This query lists each device registered in Intune with its most recent contact time, filtering out devices that have contacted within the 90 days.
Query:
IntuneDevices
| extend LastContactTime = todatetime(LastContact)
| where LastContactTime < ago(90d)
| summarize arg_max(LastContactTime, *) by DeviceNameExplanation
This query retrieves a list of devices registered in Intune along with their most recent contact time. It filters out devices that have not contacted within the last 90 days. The result is summarized by the device name, showing the device with the latest contact time.
Details

Ugur Koc
Released: January 10, 2024
Tables
IntuneDevices
Keywords
IntuneDevicesLastContactTimeagosummarizearg_maxDeviceName
Operators
extendtodatetimewhere<agosummarizearg_maxby