Remotely Reboot an Intune-Managed Device via Microsoft Graph

Prev Next

Trigger a reboot on a stuck or unresponsive Intune-managed Windows device and verify that it checks back in.

Complexity: Beginner. Impact: device-management + help-desk + user-support + intune + windows.

Why use this workflow

End users occasionally report that their Windows device is unresponsive after a feature update, a policy deployment, or a long-running install. Instead of walking the user through a hard power-off (which risks data loss and file system corruption), you can issue a remote reboot through Intune. The device receives the command on its next Intune check-in (or right away if it is online), closes sessions, and restarts.

Typical triggers:

  • Device is stuck on a spinning wheel, login screen, or post-update screen
  • Applications fail to launch and a restart would clear the state
  • A required policy or configuration needs a reboot to take effect
  • The user is remote and cannot reach the power button (for example, a remote VM)

This workflow covers locating the user's device, issuing the rebootNow action through Microsoft Graph, and verifying that the device checked back in afterward.

Expected outcomes

  • Identified the correct Intune-managed device for the target user
  • Triggered a remote reboot using the Microsoft Graph rebootNow action
  • Confirmed Intune accepted the reboot command (HTTP 204 response)
  • Verified the device checked back in by inspecting the updated lastSyncDateTime
  • A repeatable PowerShell workflow for future reboot requests

Risks and considerations

  • Unsaved work is lost. rebootNow forces a restart. Where possible, notify the user first (Teams message or email) and give them time to save.
  • Endpoint naming matters. Use /v1.0/deviceManagement/managedDevices/{id}/rebootNow. The beta endpoint does not expose a /reboot segment and returns HTTP 400 - Resource not found for the segment 'reboot'.
  • The command is queued, not synchronous. A 204 response means Intune accepted the request. The device must be online (or check in) before it reboots. For offline devices, the command can wait until the next check-in.
  • lastSyncDateTime lag. Immediately after you issue the reboot, the sync timestamp still shows the pre-reboot time. Wait and re-check before concluding that the device is unresponsive.
  • Platform support. rebootNow is supported on Windows 10 and 11 and on macOS. It is not supported on iOS, iPadOS, or Android personal profiles.
  • Privileged operation. The reboot action requires the DeviceManagementManagedDevices.PrivilegedOperations.All scope. Treat it as a change action and log it in your change record.
  • Do not loop reboots. If the first reboot does not resolve the issue, investigate (event logs, Intune diagnostics) before you issue another. Repeated forced reboots can interrupt update sequencing and leave the device in a worse state.

Required permissions

PermissionWhy it's needed
DeviceManagementManagedDevices.Read.AllRead the list of managed devices to locate the target device by user or device name
DeviceManagementManagedDevices.PrivilegedOperations.AllRequired to invoke the rebootNow action against a managed device
User.Read.AllResolve the user's UPN and object ID when searching for their devices
Intune Administrator or Help Desk Operator roleDirectory role granting permission to perform device actions in Intune

Ask Dex

Paste the prompt into a Dex conversation.

Prompt for IT admins

{user}'s device is stuck after updates. Identify their Intune-managed device, trigger a remote reboot via Microsoft Graph (rebootNow), confirm the action was accepted, and verify the device checks back in afterward.

How an end user can ask Dex

My computer is frozen after a Windows update and I can't do anything. Can you restart it for me?

Manual steps (admin center)

  1. Open the Microsoft Intune admin center and sign in with an account that holds the Intune Administrator or Help Desk Operator role.
  2. Go to Devices > All devices.
  3. In the filter bar, search for the device name or the user's UPN (for example, matan.sheinberg@contoso.com). Confirm the row matches the user's assigned device by checking Primary user, OS, and Last check-in.
  4. Click the device name to open its overview.
  5. In the command bar at the top, click More (if needed) and select Restart.
  6. Read the confirmation dialog, then click Yes to confirm.
  7. A notification confirms that the action was sent. The device overview shows Restart - Pending under Device actions status.
  8. Refresh the device page after a short wait and verify that Last check-in has updated and that Device actions status shows Restart - Complete.
  9. If the action stays in Pending, the device is likely offline. Contact the user or attempt a manual power cycle.

Microsoft Graph API

Step 1: Resolve the user (optional)

If you only have the user's name or UPN, confirm the account exists:

GET https://graph.microsoft.com/v1.0/users/{userPrincipalName}?$select=id,displayName,userPrincipalName

Example response:

{
  "id": "2cdb295b-4b23-4fc3-bd48-5331d1693a7e",
  "displayName": "Matan Sheinberg",
  "userPrincipalName": "matan.sheinberg@contoso.com"
}

Step 2: Find the managed device

GET https://graph.microsoft.com/beta/deviceManagement/managedDevices?$filter=userPrincipalName eq '{upn}'&$select=id,deviceName,operatingSystem,model,lastSyncDateTime,complianceState

Pick the device ID that matches the user's affected machine. Example:

{
  "id": "cfd782ad-9556-4cd5-b64b-c06e70b8d706",
  "deviceName": "DESKTOP-O7KP0T2",
  "operatingSystem": "Windows",
  "lastSyncDateTime": "2026-02-02T14:45:58Z"
}

Step 3: Trigger the reboot

Important: use the v1.0 endpoint with the action name rebootNow. The beta /reboot segment is not valid and returns HTTP 400.

POST https://graph.microsoft.com/v1.0/deviceManagement/managedDevices/{deviceId}/rebootNow
Content-Length: 0

Successful response:

HTTP/1.1 204 No Content

A 204 means Intune has queued the command. If the device is online it reboots. Otherwise the command waits for the next check-in.

Step 4: Verify check-in

After a short wait, poll the device to see if lastSyncDateTime advanced:

GET https://graph.microsoft.com/v1.0/deviceManagement/managedDevices/{deviceId}?$select=id,deviceName,lastSyncDateTime,managementState

If the timestamp is recent and managementState is managed, the device rebooted and checked in.

Common errors

StatusMeaningFix
400: Resource not found for the segment 'reboot'Wrong action nameUse rebootNow, not reboot
403: ForbiddenMissing scope or roleGrant DeviceManagementManagedDevices.PrivilegedOperations.All
404: Not FoundWrong device IDQuery managedDevices again

PowerShell

The Microsoft Graph PowerShell SDK wraps the same REST endpoints and handles authentication for you.

1. Install and connect

# One-time install
Install-Module Microsoft.Graph.DeviceManagement.Actions -Scope CurrentUser
Install-Module Microsoft.Graph.DeviceManagement -Scope CurrentUser

# Connect with the required scopes
Connect-MgGraph -Scopes "DeviceManagementManagedDevices.Read.All","DeviceManagementManagedDevices.PrivilegedOperations.All","User.Read.All"

2. Find the device

$upn = "matan.sheinberg@contoso.com"
$device = Get-MgDeviceManagementManagedDevice -Filter "userPrincipalName eq '$upn'" |
    Select-Object -First 1 Id, DeviceName, OperatingSystem, LastSyncDateTime
$device

3. Issue the reboot

Invoke-MgRebootNowManagedDevice -ManagedDeviceId $device.Id

There is no output on success (HTTP 204). An exception indicates a permission or ID problem.

4. Verify check-in

Start-Sleep -Seconds 300
Get-MgDeviceManagementManagedDevice -ManagedDeviceId $device.Id |
    Select-Object DeviceName, LastSyncDateTime, ManagementState

Compare the new LastSyncDateTime against the value you captured before the reboot. If it advanced, the device rebooted and checked in.