--- title: "Audit an Intune-Managed Device and Trigger a Remote Sync" slug: "dex-wf-audit-intune-device-and-sync" updated: 2026-11-30T16:15:17Z published: 2026-11-30T16:15:17Z canonical: "documentation.sysaid.com/dex-wf-audit-intune-device-and-sync" --- > ## Documentation Index > Fetch the complete documentation index at: https://documentation.sysaid.com/llms.txt > Use this file to discover all available pages before exploring further. # Audit an Intune-Managed Device and Trigger a Remote Sync Diagnose device health, compliance, and check-in status, then force a policy refresh to remediate common issues. **Complexity:** Intermediate. **Impact:** device-support + endpoint-management + user-productivity + low-risk. ## Why use this workflow When a user reports a performance issue, a connectivity problem, or a policy or app that isn't applying correctly, the first step is usually to audit the device's current state in Intune and force a check-in. A device that hasn't synced recently may be running stale policies, missing app assignments, or reporting outdated compliance, all of which can show up as slowness, sign-in errors, or failed installs. This workflow walks through the standard triage: resolve the user, enumerate their managed devices, inspect health (storage, compliance, last sync, configuration profile state), and trigger a remote sync. It is a non-destructive first response that resolves many tickets on its own and produces the diagnostic data needed to escalate the rest. ## Expected outcomes - A snapshot of the user's device: OS, model, storage, compliance state, and last check-in time - Visibility into which compliance policies and configuration profiles are applied, and which are in an error state - A remote sync command delivered to the device to refresh policies and update Intune reporting - Documented findings you can share with the user or attach to the ticket - A decision point: the sync resolved the issue, or you escalate to a reboot or deeper investigation ## Risks and considerations ### Safe operations (low risk) - **Sync** is non-destructive. It forces the MDM client to check in. - **Read operations** on managed devices and compliance states do not change anything. ### Watch out for - **Beta endpoints.** This workflow uses `/beta` for richer device metadata. Beta APIs can change without notice. For production automation, prefer `/v1.0` where the fields you need are available. - **Invalid `$select` fields.** Field availability differs between `/v1.0` and `/beta` and across OS types. If a `$select` returns HTTP 400, drop the offending field and retry. - **Compliance error state.** This can be a reporting lag rather than a real failure. Sync first and re-check before you declare the device non-compliant. - **Reboot versus sync.** A reboot disrupts the user's session. Escalate to a remote reboot only after the sync fails and the user agrees. - **User Experience Analytics.** The `userExperienceAnalyticsDevicePerformance` endpoint requires the feature to be enabled and licensed. Expect HTTP 400 responses in tenants without it. ## Required permissions | Permission | Why it's needed | | --- | --- | | User.Read.All | Resolve the reporting user's account by name or UPN | | DeviceManagementManagedDevices.Read.All | Read device inventory, compliance state, and last check-in data | | DeviceManagementManagedDevices.PrivilegedOperations.All | Trigger a remote sync (and a reboot, if you escalate) | | DeviceManagementConfiguration.Read.All | Read device configuration and compliance policy states | ## Ask Dex Paste the prompt into a Dex conversation. ### Prompt for IT admins ``` {user} reports their computer is slow. Audit their Intune-managed device (compliance, last check-in, storage, policy/config state), trigger a remote sync to refresh policies, and report findings with a recommended next step. ``` ### How an end user can ask Dex ``` My work laptop has been really slow today - can you take a look? ``` ## Manual steps (admin center) ### Step 1: Locate the user's device 1. Sign in to the [Microsoft Intune admin center](https://intune.microsoft.com). 2. Go to **Users** > **All users** and search for the user. 3. Open the user and select **Devices** to see all Intune-managed devices associated with that account. ### Step 2: Review device health 1. Select the device name to open its overview page. 2. On the **Overview** tab, review *Compliance*, *Last check-in*, *OS version*, *Primary user*, and storage (under **Hardware**). 3. Select **Device compliance** to see the per-policy state. Look for policies in an *Error* or *Not compliant* state. 4. Select **Device configuration** to see configuration profile results. 5. Optional: select **Managed apps** for app deployment state, or open the user experience scores if your tenant is licensed for them. ### Step 3: Trigger a remote sync 1. On the device overview page, select **Sync** in the top toolbar. 2. Confirm the prompt. Intune queues the command, and the device checks in when it next has network access. 3. Refresh the page after a short wait and confirm that *Last check-in* has updated. ### Step 4: Escalate if needed - If the sync does not resolve the issue and the user agrees, use the **Restart** action (Windows) to force a reboot. - For deeper hardware signals, check **Reports** > **Endpoint analytics**. ## Microsoft Graph API ### 1. Resolve the user ``` GET https://graph.microsoft.com/v1.0/users?$filter=startswith(displayName,'Alex W')&$select=id,displayName,userPrincipalName ``` Capture the `id` from the response for the following calls. ### 2. List the user's managed devices ``` GET https://graph.microsoft.com/beta/users/{userId}/managedDevices?$select=id,deviceName,operatingSystem,osVersion,complianceState,lastSyncDateTime,model,manufacturer,totalStorageSpaceInBytes,freeStorageSpaceInBytes,azureADRegistered ``` Example response: ``` {  "value": [{    "id": "db25e629-e2f8-4a8e-ad4c-18d27cfa68c3",    "deviceName": "DESKTOP-PHSSKAD",    "complianceState": "compliant",    "lastSyncDateTime": "2026-02-18T10:37:45Z",    "freeStorageSpaceInBytes": 41588621312  }] } ``` `isRooted` is not a valid `$select` field on `managedDevice`. If a field causes an HTTP 400, drop it and retry. ### 3. Inspect compliance and configuration state ``` GET /beta/deviceManagement/managedDevices/{deviceId}/deviceCompliancePolicyStates GET /beta/deviceManagement/managedDevices/{deviceId}/deviceConfigurationStates ``` Look for entries with `"state": "error"` or `"nonCompliant"`. ### 4. Trigger a remote sync ``` POST https://graph.microsoft.com/beta/deviceManagement/managedDevices/{deviceId}/syncDevice ``` An HTTP `204 No Content` response indicates the command was queued. The device picks it up on its next check-in. ### 5. (Optional) Escalate to a reboot ``` POST /beta/deviceManagement/managedDevices/{deviceId}/rebootNow ``` ## PowerShell This approach uses the Microsoft Graph PowerShell module. Install it once with `Install-Module Microsoft.Graph -Scope CurrentUser`. ### 1. Connect with the right scopes ``` Connect-MgGraph -Scopes "User.Read.All","DeviceManagementManagedDevices.Read.All","DeviceManagementManagedDevices.PrivilegedOperations.All","DeviceManagementConfiguration.Read.All" ``` ### 2. Resolve the user and list devices ``` $user = Get-MgUser -Filter "startswith(displayName,'Alex W')" | Select-Object -First 1 $devices = Get-MgUserManagedDevice -UserId $user.Id $devices | Select-Object DeviceName,OperatingSystem,ComplianceState,LastSyncDateTime,@{n='FreeGB';e={[math]::Round($_.FreeStorageSpaceInBytes/1GB,1)}} ``` ### 3. Inspect compliance policy states ``` $deviceId = $devices[0].Id Invoke-MgGraphRequest -Method GET -Uri "/beta/deviceManagement/managedDevices/$deviceId/deviceCompliancePolicyStates" ``` ### 4. Trigger the sync ``` Sync-MgDeviceManagementManagedDevice -ManagedDeviceId $deviceId ```