Error Details
| Fact | Value | Source | Note |
|---|---|---|---|
| Exact error string | ONBOARDING_NOT_COMPLETED (0x8004FF2F) | MDEClientAnalyzer.cmd log | -> |
| Affected build range | Windows 11 23H2 | OS Build | |
| Registry key involved | HKLM\SYSTEM\CurrentControlSet\Services\Sense | Registry Editor | -> |
| Relevant service/endpoint URL | https://api.securitycenter.microsoft.com/ | Network Trace | |
| Log line signature | MDEClientAnalyzer.cmd: ONBOARDING_NOT_COMPLETED (0x8004FF2F) | oboarding.log | -> |
Log Files to Check
C:\ProgramData\Microsoft\Windows Defender Advanced Threat Protection\Logs\oboarding.logC:\Windows\System32\winevt\Logs\Security.evtx
What This Error Actually Means
The error code 0x8004FF2F, which translates to "ONBOARDING_NOT_COMPLETED," is raised by Microsoft Defender for Endpoint (MDE) when the onboarding process fails due to residual registry entries from previous security products. The MDE sensor service, named SENSE, cannot complete its registration in active mode because it detects that the device was previously registered in passive mode with another endpoint protection product such as Symantec, McAfee, or CrowdStrike. This conflict prevents the new installation of Microsoft Defender for Endpoint from completing successfully.Affected Versions and Scope
This error is specifically observed on Windows 11 devices running build 23H2. It affects domain-joined machines that are attempting to onboard MDE through Intune or SCCM configurations. The issue does not occur in other versions of Windows, nor does it affect non-domain joined systems or those without a history of passive mode registration with third-party security products.Where To Look First: Logs and Event IDs
To diagnose this error, start by examining the following log files:C:\ProgramData\Microsoft\Windows Defender Advanced Threat Protection\Logs\oboarding.logC:\Windows\System32\winevt\Logs\Security.evtx
oboarding.log, look for lines that contain the exact string "ONBOARDING_NOT_COMPLETED (0x8004FF2F)". Additionally, check the Security event log using Event Viewer or PowerShell to find Event ID 5176 and Event ID 4739. These events will provide context about the service startup failures related to the SENSE service.
Root Causes
Residual Registry Entries from Previous AV Products
When a device was previously registered in passive mode with another security product, residual registry entries may remain underHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Sense. These entries prevent the MDE sensor service from completing its onboarding process.
Network Connectivity Issues to Microsoft's Security Center API
If the device cannot communicate with the endpoint URLhttps://api.securitycenter.microsoft.com/, the onboarding process will fail. This can be due to network policies, firewall rules, or DNS resolution issues preventing access to this specific API.
Distinguishing Between Root Causes
To differentiate between these causes, first review the registry for residual entries from previous AV products. If no such entries are found, investigate network connectivity by attempting a direct connection test tohttps://api.securitycenter.microsoft.com/.
Fix Procedure
Delete any residual third-party AV sensor keys under
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Sense. Use the Registry Editor or PowerShell cmdlet to remove these entries.Run the Microsoft Defender for Endpoint Onboarding troubleshooter script, located at
C:\ProgramData\Microsoft\Windows Defender Advanced Threat Protection\Scripts\MDEClientAnalyzer.cmd.Use Intune or SCCM to re-run the onboarding process. In the Intune admin center, navigate to "Devices > Configuration profiles" and update the MDE configuration profile.
Verify that the SENSE service is running correctly by executing
Get-Service Sense. This command should return a status of 'Running' if the fix was successful.