Diagnose why a Windows device registered in Entra ID is not yet managed by Intune, and manually trigger MDM auto-enrollment without a full reimage or re-login.
Complexity: Intermediate. Impact: Device Management + Intune + Windows + Troubleshooting + MDM Enrollment.
Why use this workflow
After you enable automatic MDM enrollment in Entra ID (MDM user scope set to All or to a specific group), Entra ID joined Windows 10 and 11 devices should enroll into Intune automatically. In practice there is sometimes a gap: the device shows as AzureAd joined in Entra ID but never appears in the Intune managed devices list.
Common causes include:
- The scheduled auto-enrollment task has not run yet.
- The user is missing a valid Intune license.
- The device was joined before the MDM scope was set, so the enrollment trigger never ran.
- Group Policy or a conflicting MDM setting is blocking enrollment.
This workflow walks through how to verify a device's enrollment state across Entra ID and Intune, then trigger manual enrollment on the device itself.
Expected outcomes
- Confirmed whether the target device exists in Entra ID, in Intune, or both.
- Identified whether the user has an Intune license and whether the device is missing the MDM management agent.
- Triggered manual auto-enrollment on the device using the Windows Settings page,
deviceenroller.exe, or a scheduled task re-run. - Verified that the device now reports as managed in Intune with a compliance state.
Risks and considerations
Things to watch for
- Do not unjoin and rejoin as a first step. Disconnecting the work account from Windows can destroy local profiles and BitLocker recovery keys stored only in Entra ID. Try a manual sync first.
- A license is required. Auto-enrollment silently fails if the user has no Intune license. Check the license assignment before you troubleshoot the device.
- MDM scope versus MAM scope. Make sure the MDM user scope (not only MAM) is set to All or includes the user's group under Entra ID > Mobility (MDM and MAM).
- Hybrid joined devices follow a different enrollment path through Group Policy, using the Enable automatic MDM enrollment using default Azure AD credentials policy.
deviceenroller.exealone may not be enough. - Propagation delay. After a successful enrollment, the device can take a while to appear in the Intune admin center and in Graph. Wait before you re-check.
Required permissions
| Permission | Why it's needed |
|---|---|
| User.Read.All | Resolve the target user's account by display name or UPN |
| Device.Read.All | Read Entra ID device registration records to check join state and the isManaged flag |
| DeviceManagementManagedDevices.Read.All | Query Intune to confirm whether the device has enrolled into MDM |
| Directory.Read.All | List a user's registeredDevices and ownedDevices in Entra ID |
Ask Dex
Paste the prompt into a Dex conversation.
Prompt for IT admins
Check whether {device_name} (owned by {user}) is managed by Intune. If it's registered in Entra ID but not enrolled in Intune, confirm the user has an Intune license, verify MDM auto-enrollment scope is set correctly, and provide step-by-step instructions to trigger manual enrollment on the device.
How an end user can ask Dex
My work laptop isn't showing up as managed by IT even though I signed in with my work account. What do I need to do?
Manual steps (admin center)
Step 1: Verify in Entra ID
- Sign in to the Microsoft Entra admin center.
- Go to Identity > Devices > All devices.
- Search for the device by name (for example,
DESKTOP-PHSSKAD). - Note the Join type (Azure AD joined, Hybrid, or Registered) and the MDM column. If MDM is blank, the device has not enrolled in Intune.
Step 2: Verify in Intune
- Go to the Microsoft Intune admin center.
- Go to Devices > All devices.
- Search by device name. If there are no results, the device is not yet managed.
- Also check Devices > Enrollment > Automatic Enrollment and confirm that the MDM user scope is set to All or includes the user's group.
Step 3: Confirm the user has an Intune license
- In the Microsoft 365 admin center, go to Users > Active users and open the user.
- Under Licenses and apps, verify that a license that includes Intune is assigned.
Step 4: On the user's device, trigger enrollment manually
- Have the user open Start > Settings > Accounts > Access work or school.
- Select the connected work account, then select Info.
- Scroll to Device sync status and select Sync. This starts the MDM enrollment check.
- If nothing happens, open an elevated Command Prompt and run
deviceenroller.exe /c /AutoEnrollMDM. - Alternatively, open Task Scheduler > Microsoft > Windows > EnterpriseMgmt and run the task Schedule created by enrollment client for automatically enrolling in MDM from AAD.
Step 5: Verify enrollment succeeded
- After a short wait, refresh Devices > All devices in Intune.
- The device should now appear with a management agent of MDM and a compliance state.
Microsoft Graph API
1. Resolve the user
GET https://graph.microsoft.com/v1.0/users?$filter=startswith(displayName,'{name}')&$select=id,displayName,userPrincipalName2. Look up the Intune managed device
GET https://graph.microsoft.com/beta/deviceManagement/managedDevices?$filter=deviceName eq '{deviceName}'&$select=id,deviceName,userPrincipalName,operatingSystem,complianceState,managementAgent,enrolledDateTimeIf the value array in the response is empty, the device is not enrolled in Intune.
3. Check the Entra ID device record
GET https://graph.microsoft.com/v1.0/devices?$filter=displayName eq '{deviceName}'&$select=id,displayName,isManaged,trustType,operatingSystemInterpret the response:
trustType: "AzureAd"andisManaged: true: the device is joined and managed by Intune.trustType: "AzureAd"andisManagedofnullorfalse: the device is joined but not enrolled in MDM. This is the state that requires manual enrollment.trustType: "ServerAd": the device is hybrid joined, and the enrollment path is different.
4. List devices registered to the user
GET https://graph.microsoft.com/v1.0/users/{userId}/registeredDevices?$select=id,displayName,isManaged,trustType,operatingSystem5. (Optional) Check the user's licenses
GET https://graph.microsoft.com/v1.0/users/{userId}/licenseDetailsExample: diagnosis result
{
"deviceName": "DESKTOP-PHSSKAD",
"entraId": { "trustType": "AzureAd", "isManaged": null },
"intune": { "enrolled": false },
"diagnosis": "Entra joined, not MDM enrolled - trigger auto-enrollment on device"
}Note: Graph cannot remotely trigger deviceenroller.exe on an unmanaged device. The enrollment trigger must run on the endpoint (see the Manual steps and PowerShell sections).
PowerShell
The PowerShell workflow has two halves:
- On the admin workstation: query Graph with Microsoft Graph cmdlets to diagnose where the device is stuck.
- On the target device: run a local command to trigger enrollment.
Connect-MgGraph -Scopes "User.Read.All","Device.Read.All","DeviceManagementManagedDevices.Read.All"
# Look for the device in Intune
Get-MgBetaDeviceManagementManagedDevice -Filter "deviceName eq 'DESKTOP-PHSSKAD'"
# Look for the device in Entra ID
Get-MgDevice -Filter "displayName eq 'DESKTOP-PHSSKAD'" | Select-Object DisplayName, TrustType, IsManagedDevice side: trigger enrollment
On the Windows device itself, the user (or the help desk in a remote session) runs one of the following:
# Option A - trigger the auto-enrollment task directly
deviceenroller.exe /c /AutoEnrollMDM
# Option B - run the scheduled task that Windows itself uses
Get-ScheduledTask -TaskPath "\Microsoft\Windows\EnterpriseMgmt\" | Start-ScheduledTask