Error Details
| Fact | Value | Source | Note |
|---|
| Exact error string | We could not auto-discover a management endpoint matching your username. Confirm your email address and try again, or set up manually. | Windows Settings > Accounts > Access work or school > Connect | -> |
| OS build affected | Windows 10/11 MDM Enrollment | Microsoft Intune documentation | -> |
| Relevant DNS CNAME record | enterpriseenrollment.<domain.com> | Public DNS provider management console | Should resolve to EnterpriseEnrollment-s.manage.microsoft.com |
| Intune service endpoint URLs | EnterpriseEnrollment.contoso.com or enrollment.manage.microsoft.com | Microsoft Intune documentation | -> |
| Log file signature | Event ID 75: 'The auto-discovery request could not be resolved' | Windows Event Viewer > Applications and Services Logs > Microsoft > Windows > DeviceManagement-Enterprise-Diagnostics-Provider > Admin | -> |
Log Files to Check
C:\ProgramData\Microsoft\DMClient\ProvisioningCommands.logC:\Users\Public\Documents\MDMDiagnostics\MDMDiagReport.html
What This Error Actually Means
The error code
0x80cf4017 indicates that the Microsoft Intune Mobile Device Management (MDM) enrollment process failed due to an inability to communicate with the Intune service discovery endpoint. Specifically, this error occurs when the Windows MDM client cannot reach either
EnterpriseEnrollment.contoso.com or
enrollment.manage.microsoft.com during automatic or manual enrollment. The error is raised by the Device Management-Enterprise-Diagnostics-Provider component in Windows 10/11, which logs events related to MDM enrollment and configuration.
Affected Versions and Scope
This issue affects Windows 10 and Windows 11 devices attempting MDM enrollment through Intune. It is not limited to specific OS builds but can occur across various versions of Windows 10/11 when the device fails to discover the Intune service endpoint. The error does not affect devices enrolled via other methods, such as Azure Active Directory (Azure AD) Join or Microsoft AutoPilot.
Where To Look First: Logs and Event IDs
To diagnose this issue, examine the following logs and events:
1. **Event Viewer**:
- Navigate to
Applications and Services Logs > Microsoft > Windows > DeviceManagement-Enterprise-Diagnostics-Provider > Admin.
- Look for
Event ID 75: "The auto-discovery request could not be resolved."
- Look for
Event ID 76: "MDM enrollment failed: 0x80cf4017."
2. **Log Files**:
-
C:\ProgramData\Microsoft\DMClient\ProvisioningCommands.log
- Search for entries containing
DiscoveryError or
0x80cf4017.
-
C:\Users\Public\Documents\MDMDiagnostics\MDMDiagReport.html
- Review the enrollment section for errors like "EnterpriseEnrollment DNS SRV lookup failed" or "Discovery URL unreachable."
3. **PowerShell Command**:
- Use
Get-WinEvent -LogName "Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider/Admin" -MaxEvents 50 to retrieve recent events from the diagnostic provider.
Root Causes
1. DNS Configuration Issues
The most common cause is a misconfigured or missing DNS CNAME record for
enterpriseenrollment.. This record should point to
EnterpriseEnrollment-s.manage.microsoft.com. If the DNS lookup fails or resolves to an incorrect IP address, the enrollment process cannot proceed.
2. MDM Automatic Enrollment Disabled in Entra ID
If the tenant has not enabled MDM automatic enrollment in the Entra admin center, devices will fail to discover the Intune service endpoint. This occurs when the "MDM user scope" is set to
None instead of
All or a specific group.
3. Network Connectivity Issues
Firewalls or proxies may block access to Intune endpoints on port 443 (HTTPS). Specifically, devices must be able to reach:
-
enrollment.manage.microsoft.com
-
EnterpriseEnrollment-s.manage.microsoft.com
4. UPN Suffix Mismatch
The user's Entra ID UPN suffix may not match a verified custom domain with an EnterpriseEnrollment CNAME record, and the fallback endpoint
enrollment.manage.microsoft.com is unreachable.
Fix Procedure
- Verify DNS Configuration:
- Open Command Prompt and run
nslookup enterpriseenrollment..
- Ensure the result resolves to EnterpriseEnrollment-s.manage.microsoft.com and then to a Microsoft IP address.
- In your DNS management console (e.g., Azure DNS, GoDaddy, Cloudflare), check for:
- CNAME record: Host = enterpriseenrollment, Value = EnterpriseEnrollment-s.manage.microsoft.com
- CNAME record: Host = enterpriseregistration, Value = enterpriseregistration.windows.net
- Enable MDM Automatic Enrollment:
- Navigate to the Entra admin center > Identity > Mobility (MDM and MAM) > Microsoft Intune.
- Under "MDM user scope," select
All or a specific group, then save changes.
- Test Network Connectivity:
- Run PowerShell commands:
Test-NetConnection -ComputerName enrollment.manage.microsoft.com -Port 443
Test-NetConnection -ComputerName EnterpriseEnrollment-s.manage.microsoft.com -Port 443
- Ensure TcpTestSucceeded = True.
- Check for Split-DNS Issues:
- If internal DNS overrides are causing incorrect resolutions, add a conditional forwarder for
manage.microsoft.com to point to the public DNS resolver.
- Force MDM Redeployment (Optional):
- Use
dsregcmd /status to check device registration status.
Warning: Forcing a redeployment may temporarily disconnect enrolled devices from Intune. Proceed with caution.
- Review MDM Diagnostic Report:
- Access the report at
C:\Users\Public\Documents\MDMDiagnostics\MDMDiagReport.html.
- Look for enrollment errors and follow recommended actions.
- Update Device Configuration (Optional):
- Use OMA-URI settings to enforce specific configurations:
.Device/Vendor/MSFT/Policy/Config/EnterpriseWiFi/ProfileName
.Device/Vendor/MSFT/Policy/Config/NetworkOperatorCredential/Carrier
- Monitor Device Enrollment:
- Use the Intune admin center > Devices > All devices to verify successful enrollment.
- Run
Get-MgDeviceManagementManagedDevice -Filter "deviceEnrollmentType eq 'windowsAutoEnrollment'" to list enrolled devices.
- Log Analysis Post-Fix:
- Check Event Viewer for
Event ID 72: "The auto-discovery request succeeded."
- Review ProvisioningCommands.log for successful enrollment markers.
Error Code Variants
| Error Code |
Description |
Distinguishing Factors |
| 0x80cf4017 |
MDM service URL or discovery endpoint unreachable |
Specific to DNS or network issues with Intune endpoints |
| 0x80cf4016 |
Invalid MDM configuration data received |
Occurs when the device receives malformed or invalid enrollment data |
| 0x80cf4018 |
MDM service responded with an error status code |
Indicates a server-side issue during enrollment |
Verification
To confirm the fix:
- Check Event Viewer for
Event ID 72: "The auto-discovery request succeeded."
- Verify device enrollment in the Intune admin center > Devices > All devices.
- Run
dsregcmd /status to ensure the device is properly registered.
Prevention
Implement the following measures:
1. Regularly monitor DNS records for
enterpriseenrollment. and
enterpriseregistration..
2. Use PowerShell scripts to automate network connectivity tests to Intune endpoints.
3. Configure monitoring tools (e.g., Azure Monitor) to alert on MDM enrollment failures.
4. Review Entra ID settings periodically to ensure MDM automatic enrollment remains enabled.
Tip: Use the Test-NetConnection cmdlet regularly to verify network access to Intune endpoints and prevent recurring issues.
By following this guide, you can effectively troubleshoot and resolve the
0x80cf4017 error, ensuring seamless MDM enrollment for Windows 10/11 devices in your organization.