To find stale devices in Microsoft Intune, list the managed devices whose last sync date is older than your cutoff, such as 90 days, and sort them oldest first. The date is when a device last completed a successful sync with Intune, not when someone last used it, so a device can look stale while its owner is away.
| Method | Best fit |
|---|---|
| PowerShell | A tenant-wide CSV of the devices that have not synced since your cutoff, oldest first. |
| Admin centre | A quick look at last check-in across the devices in 1 tenant, or at 1 device. |
| Altivane | Recommended for recurring reviews, with stale Intune devices and Entra device objects rated against a threshold. |
Before you start
Use an account that can read Intune devices, such as one in the Read Only Operator role, which cannot change Intune. The tenant needs an active Intune licence. The PowerShell example requests DeviceManagementManagedDevices.; your organisation may require administrator consent.
The list covers devices enrolled in Intune, and leaves out any that a device cleanup rule has hidden. The examples read and export; they do not retire, wipe, hide or delete any device.
Option 1
Find stale devices with PowerShell
Install the modules once, then connect and export the managed devices that last synced before the cutoff. The filter runs in Microsoft Graph, so only those devices come back.
# Install once, if the modules are not already installed.
Install-Module Microsoft.Graph.Authentication, Microsoft.Graph.DeviceManagement -Scope CurrentUser$ErrorActionPreference = 'Stop'
$days = 90
$now = (Get-Date).ToUniversalTime()
$limit = $now.AddDays(-$days)
$cutoff = $limit.ToString('yyyy-MM-ddTHH:mm:ssZ', [cultureinfo]::InvariantCulture)
Connect-MgGraph -Scopes 'DeviceManagementManagedDevices.Read.All' -NoWelcome
try {
$filter = "lastSyncDateTime lt $cutoff"
$properties = 'id', 'deviceName', 'userPrincipalName', 'operatingSystem', 'osVersion',
'complianceState', 'managedDeviceOwnerType', 'enrolledDateTime', 'lastSyncDateTime'
$devices = Get-MgDeviceManagementManagedDevice -All -Filter $filter -Property $properties
$report = @(foreach ($device in $devices) {
$lastSync = $device.LastSyncDateTime.ToUniversalTime()
[pscustomobject]@{
DeviceName = $device.DeviceName
User = $device.UserPrincipalName
OperatingSystem = $device.OperatingSystem
OsVersion = $device.OsVersion
ComplianceState = $device.ComplianceState
Ownership = $device.ManagedDeviceOwnerType
EnrolledDateTime = $device.EnrolledDateTime
LastSyncDateTime = $lastSync
DaysSinceSync = [int][math]::Floor(($now - $lastSync).TotalDays)
Id = $device.Id
}
})
if ($report.Count -eq 0) {
Write-Output "No managed devices last synced more than $days days ago."
} else {
$report | Sort-Object LastSyncDateTime |
Export-Csv -Path './stale-devices.csv' -NoTypeInformation -Encoding utf8
Write-Output "$($report.Count) managed devices last synced more than $days days ago."
}
} finally {
Disconnect-MgGraph | Out-Null
}The script keeps every platform and ownership type, oldest sync first. DaysSinceSync counts whole days to the moment the script ran. Set $days to 30 for a tighter list. To keep 1 platform, filter on OperatingSystem with Where-Object after the read.
Option 2
Review last check-in in the admin centre
- Sign in to the Microsoft Intune admin centre for the correct tenant.
- Go to Devices > All devices.
- Check that the Last check-in column is showing, or add it with Columns.
- Select the Last check-in heading to sort, and again to reverse, so the oldest date is at the top.
- Read each date against your cutoff, and select a device for its details. Leave without changing anything.
This suits a quick look at a tenant you already have open. For a list to keep and compare from month to month, use PowerShell or a report.
Option 3 ยท Recommended for recurring reviews
Report on stale devices with Altivane
- Open Altivane and choose the tenant.
- Build the tenant's documents with the Devices scorecard report in full and set Stale devices to the number of days without activity to flag, starting at 180. Builds start it on Summary, which counts stale devices without listing them; Summary only makes every full report run as Summary.
- Open the tenant's Excel workbook and read Stale Managed Devices for Intune devices that have not synced for that many days, longest silent first, with Last Sync and Days Since Sync.
- Read Stale Entra Device Objects for enabled Microsoft Entra ID device objects with no recent Last Activity, and Device Summary for the counts.
The 1 setting covers both lists: Intune devices by last sync, and Entra device objects by last activity. The Entra activity timestamp refreshes only about every 14 days, so a window under 21 days is not reliable for that list. A device with no date recorded is listed with those past the limit, so look for a blank before you retire one. The scorecard rates the stale share of managed devices and enabled Entra device objects against Warning at and Critical at, starting at 5% and 15% for Intune and 20% and 40% for Entra. The build also writes the tenant's Word report.
Contact usCommon questions
Does a stale device mean the device is gone?
No. The date is the last successful sync, so a laptop in a drawer, an owner on long leave and a device that lost its enrolment look alike. Ask the owner before you retire a device. A device deleted from Microsoft Entra ID cannot be recovered, and neither can its BitLocker recovery keys.
Can Intune hide stale devices for me?
Yes. Device cleanup rules, under Devices > Device cleanup rules, hide devices that have not checked in for 30 to 270 days. They do not wipe or retire a device, and the device stays in Microsoft Entra ID. Creating a rule changes the tenant and needs the Intune Administrator role or a custom role with the cleanup permissions.
Why is a stale device also non-compliant?
Intune's default compliance policy marks a device non-compliant when it stays out of contact with Intune; the default grace period is 30 days. To see the reasons for each device, see how to find non-compliant devices.
Microsoft references
Technical references checked on 5 October 2026. The example scripts have been reviewed and syntax checked; they have not been run against a live tenant.
- Get-
Mg Device Management Managed Device reference - List managedDevices in Microsoft Graph
- managedDevice properties
- Device management in Microsoft Intune
- Device cleanup rules in Microsoft Intune
- Monitor results of your Intune device compliance policies
- Manage stale devices in Microsoft Entra ID
- Built-in role permissions for Microsoft Intune