๐ฑ Recipe ยท Intune & Device Management
Check Intune Device Status and Recent Remote Actions
Look up a managed device in Microsoft Intune, review compliance and enrollment details, and verify whether any remote actions (wipe, retire, sync) are pending
Complexity
Beginner
Impact
read-only + triage + device-support + help-desk
Context
Why This Matters
Help desk and endpoint admins frequently need to answer a simple question: what is the current state of this device? Whether a user has reported a sync issue, a manager is asking why a laptop shows as non-compliant, or someone needs to confirm that a previously-issued remote wipe actually completed, the fastest way to get a definitive answer is to query Intune directly.
This recipe walks through the standard triage flow: locate a Windows, macOS, iOS, or Android device by name in Microsoft Intune, pull its compliance and hardware record, and inspect the deviceActionResults property for any remote actions (wipe, retire, sync, restart, locate, etc.) that are pending, running, or recently completed.
Run this any time a ticket mentions a specific device, before escalating compliance questions, or as the first step in an investigation of a suspected lost/stolen endpoint.
Expected Outcomes
After completing this recipe you will have:
- The Intune managed device ID, Entra device ID, and serial number for the target device
- Current compliance state, OS version, encryption status, and last check-in time
- The primary user assigned to the device
- A clear view of any remote actions that are pending, in-progress, or recently completed (including wipe, retire, sync, restart, and fresh start)
- Enough context to decide whether to escalate, retry an action, or close the ticket
Risks & Considerations
Things to watch out for:
- Device name collisions: Windows auto-generated names are usually unique, but iOS/Android devices named after the user (e.g. "Alex's iPhone") can match multiple records. Always confirm with the serial number or primary user.
- Stale data: The
lastSyncDateTimeshows when the device last checked in with Intune. If it is more than a few days old, the status you see may not reflect reality. Trigger a sync before making decisions. - Read-only operation: This recipe only reads device state. It does not modify anything. Taking follow-up actions (wipe, retire, reset passcode) requires elevated permissions and is covered in separate recipes.
- Action result history is limited: The
deviceActionResultscollection reflects recent and pending actions only. It is not a full audit log. Use the Intune audit logs or Entra sign-in logs for historical forensics. - PII exposure: Device records contain user UPN, email, serial number, and MAC addresses. Do not paste raw output into tickets or chat without redacting sensitive fields.
Required Permissions
| Permission | Why It's Needed |
|---|---|
| DeviceManagementManagedDevices.Read.All | Read managed device properties, compliance state, and deviceActionResults |
| DeviceManagementManagedDevices.ReadWrite.All | Only required if you plan to trigger a sync or follow-up remote action after inspection |
The fastest way to get this done: just ask Dex. Copy the prompt below and paste it into your Dex conversation.
For IT Admins
Paste into Dex Pro
For End Users
How an employee would ask Dex for help
Check device status using the Microsoft Intune admin center
- Sign in to the Microsoft Intune admin center with an account that has at least the Help Desk Operator role.
- In the left navigation, click .
- In the search box above the device list, type the device name (for example
DESKTOP-GORGEOUS-OPTIMAL458) and press Enter. You can also filter by primary user, OS, or serial number. - Click the matching device to open its overview blade.
- On the Overview tab, review the key status fields:
- Compliance (Compliant / Not compliant / In grace period)
- Operating system and OS version
- Primary user
- Last check-in timestamp
- Enrollment date and enrollment type
- Encryption and Jailbroken/Rooted status
- Scroll to the Device actions status section (still on the Overview blade). This lists any recent remote actions โ Sync, Restart, Wipe, Retire, Fresh Start, Locate device, Reset passcode โ along with their state: Pending, Active, Complete, or Failed.
- If no entries appear, there are no recent or pending remote actions on record.
- Optional: click Hardware in the left blade for serial number, model, storage, and network details; click Device compliance for the specific policies that contribute to the compliance verdict.
If you need the device to report fresh data before deciding on next steps, click Sync at the top of the device blade and refresh after a few minutes.
Check device status using Microsoft Graph
All endpoints below live under https://graph.microsoft.com. The deviceActionResults navigation property is only exposed on the beta endpoint, so use /beta for the action-status call.
Step 1 โ Find the device by name
GET /beta/deviceManagement/managedDevices?$filter=deviceName eq 'DESKTOP-GORGEOUS-OPTIMAL458'Example response (trimmed):
{
"value": [
{
"id": "cea20c5f-54ee-44e6-9730-604c69a828f1",
"deviceName": "DESKTOP-GORGEOUS-OPTIMAL458",
"userPrincipalName": "alex@contoso.com",
"operatingSystem": "Windows",
"osVersion": "10.0.22631",
"complianceState": "compliant",
"lastSyncDateTime": "2026-03-04T10:13:10Z",
"isEncrypted": true,
"serialNumber": "SN2766LUHTM",
"model": "Surface Laptop 5",
"manufacturer": "Microsoft"
}
]
}If the device cannot be found by exact name, try a startswith filter or search by serialNumber:
GET /beta/deviceManagement/managedDevices?$filter=startswith(deviceName,'DESKTOP-')
GET /beta/deviceManagement/managedDevices?$filter=serialNumber eq 'SN2766LUHTM'Step 2 โ Retrieve recent remote action results
Capture the id from step 1 and request the deviceActionResults property explicitly:
GET /beta/deviceManagement/managedDevices/{managedDeviceId}?$select=id,deviceName,deviceActionResultsExample response when actions exist:
{
"id": "cea20c5f-54ee-44e6-9730-604c69a828f1",
"deviceName": "DESKTOP-GORGEOUS-OPTIMAL458",
"deviceActionResults": [
{
"actionName": "wipe",
"actionState": "pending",
"startDateTime": "2026-03-05T09:12:00Z",
"lastUpdatedDateTime": "2026-03-05T09:12:00Z"
}
]
}When deviceActionResults is empty or omitted from the payload, there are no recent or pending remote actions recorded for the device.
Common actionState values
noneโ no actionpendingโ queued, waiting for the device to check incanceledโ canceled before executionactiveโ currently executingdoneโ completed successfullyfailedโ action failed; inspect device logsnotSupportedโ action is not supported on this platform
Step 3 โ (Optional) Trigger a sync
If the lastSyncDateTime is stale, queue a check-in so subsequent reads are accurate:
POST /beta/deviceManagement/managedDevices/{managedDeviceId}/syncDeviceThe call returns 204 No Content on success. The action will appear in deviceActionResults until it completes.
Check device status using PowerShell and Microsoft Graph
The Microsoft.Graph.Beta.DeviceManagement module exposes cmdlets for both the device record and its action results. If you do not have the module installed, run Install-Module Microsoft.Graph.Beta -Scope CurrentUser once.
Quick interactive check
# Connect with read-only scope
Connect-MgGraph -Scopes "DeviceManagementManagedDevices.Read.All" -NoWelcome
# Find device by name
$device = Get-MgBetaDeviceManagementManagedDevice -Filter "deviceName eq 'DESKTOP-GORGEOUS-OPTIMAL458'"
# Show key status fields
$device | Select-Object DeviceName, UserPrincipalName, OperatingSystem, OsVersion,
ComplianceState, LastSyncDateTime, IsEncrypted, SerialNumber, Model
# Retrieve device action results (requires $select on beta)
$detail = Get-MgBetaDeviceManagementManagedDevice -ManagedDeviceId $device.Id `
-Property "id,deviceName,deviceActionResults"
$detail.DeviceActionResults | Format-Table ActionName, ActionState, StartDateTime, LastUpdatedDateTimeWhat you will see
- If the device has no recent remote actions,
DeviceActionResultsis an empty array. - A pending wipe or retire appears with
ActionState = 'pending'until the device checks in and executes it. - Failed actions surface as
ActionState = 'failed'โ inspect the device's event logs or MDM diagnostics for root cause.
Use the downloadable script below to wrap this into a reusable function that accepts a device name or serial number and produces a clean status report.
Next steps