Error Details
| Fact | Value | Source | Note |
|---|---|---|---|
| Exact error string | ODRIVE_E_KFM_BLOCKED_BY_POLICY (0x8004de8a) | Event Viewer > Applications and Services > OneDrive Setup (ODSetup) | |
| Affected build range | Windows 10, Windows 11, Microsoft 365 | ||
| Registry key for KFMState | HKCU\Software\Microsoft\OneDrive\Accounts\Business1 | Registry Editor | -> check current state |
| OMA-URI for EnableKFMSilentOptIn | User/Policy/Device/Vendor/MSFT/OneDrive/EnableKFMSilentOptIn | ||
| Log line signature | Event ID 4025 - OneDrive Setup (ODSetup) | Event Viewer > Applications and Services |
Log Files to Check
C:\Windows\Logs\OneDriveSetup.logC:\ProgramData\Microsoft\OneDrive\logs\setup.log
What This Error Actually Means
The error code ODRIVE_E_KFM_BLOCKED_BY_POLICY (0x8004de8a) is raised by OneDrive when the Known Folder Move (KFM) feature encounters a policy conflict or configuration issue that prevents it from proceeding. KFM allows users to move their Windows known folders, such as Documents, Desktop, and Pictures, to their OneDrive cloud storage. This error indicates that either a Group Policy setting is blocking the operation or there's an incompatibility with existing folder redirection settings on the device.Affected Versions and Scope
This error affects users running Windows 10, Windows 11, and Microsoft 365 environments where OneDrive for Business is configured. It specifically targets scenarios where KFM has been enabled via Group Policy or Intune policies but encounters a conflict with existing folder redirection settings or policy configurations.Where To Look First: Logs and Event IDs
To diagnose this issue, start by examining the following logs:C:\Windows\Logs\OneDriveSetup.logC:\ProgramData\Microsoft\OneDrive\logs\setup.log
Root Causes
Mismatched Tenant IDs in Group Policy Settings
This issue arises when theUser/Policy/Device/Vendor/MSFT/OneDrive/EnableKFMSilentOptIn GPO setting does not match the Azure AD Tenant ID of the signed-in user. To identify this cause, compare the value stored under HKCU\Software\Microsoft\OneDrive\Accounts\Business1 with the current tenant information accessible via Settings > Accounts > Access work or school.
Incompatible Folder Redirection Policies
If a traditional folder redirection GPO is in place for Documents, Desktop, or Pictures, it can conflict with OneDrive's KFM feature. This happens because both mechanisms cannot simultaneously target the same folders. To determine if this is the cause, review Group Policy Management Console (GPMC) to check for any existing folder redirection policies.Outdated OneDrive Client Version
The error may also occur due to an outdated version of the OneDrive client that does not support KFM policy enforcement. Ensure that the installed OneDrive client is at least Build 18.111.0603 or later, which supports KFM policies.Fix Procedure
Verify GPO Configuration: Use
Get-GPResult -ComputerName $env:COMPUTERNAME | Select-String "EnableKFMSilentOptIn"to check the current value of EnableKFMSilentOptIn. Ensure it matches the Azure AD Tenant ID.Disable Conflicting Folder Redirection Policies: Navigate to Group Policy Management Console (GPMC) and disable any existing folder redirection policies for Documents, Desktop, or Pictures that conflict with KFM.
Update OneDrive Client Version: If the client version is outdated, download and install the latest build from Microsoft's official website. Use
Get-AppxPackage -Name "Microsoft.OneNote" | Select-Object Name,Versionto verify the installed version.Modify Registry Settings: To reset KFM state, navigate to
HKEY_CURRENT_USER\Software\Microsoft\OneDrive\Accounts\Business1. Modify or delete theKFMStatevalue if it's set incorrectly. Use caution as incorrect modifications can break enrolled devices.Modifying registry settings improperly can cause system instability and may require a system restore to resolve issues.Reapply KFM Policy: After resolving conflicts, re-enable the
User/Policy/Device/Vendor/MSFT/OneDrive/EnableKFMSilentOptInGPO setting with the correct Tenant ID. UseSet-GPRegistryValue -Name "OneDriveKFM" -Key "HKCU\Software\Microsoft\OneDrive\Accounts\Business1" -ValueName KFMState -Type DWord -Value 0to set or modify registry values.Monitor Log Files: After applying changes, monitor
C:\Windows\Logs\OneDriveSetup.logandC:\ProgramData\Microsoft\OneDrive\logs\setup.logfor any new error messages. UseGet-WinEvent -LogName "Application" | Where-Object {$_.Id -eq 4025}to filter events by ID.
Error Code Variants
| Error Code | Description | Distinguishing Factors |
|---|---|---|
| 0x8004de8b | KFM Blocked By User Policy | This error occurs when a user-specific policy blocks KFM. It differs from 0x8004de8a as it pertains to user-level restrictions rather than organizational policies. |
| 0x8004de8c | KFM Blocked By Device Policy | This error indicates that a device-specific policy is preventing KFM. It can be distinguished by checking the GPO settings related to device management and ensuring they do not conflict with OneDrive's KFM. |
| 0x8004de90 | KFM Blocked By Inaccessible Path | This error occurs when the target path for known folders is inaccessible. It can be identified by checking folder permissions and ensuring that the paths specified in the GPO are correctly accessible. |
Verification
To verify that the fix has been applied successfully, check the following:The
KFMStatevalue underHKEY_CURRENT_USER\Software\Microsoft\OneDrive\Accounts\Business1should reflect a successful KFM operation.In Event Viewer, look for Event ID 4025 with the message indicating that KFM has been successfully applied without errors. Use
Get-WinEvent -LogName "Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider/Admin" | Where-Object {$_.Id -eq 4025}.The OneDrive client should report no further issues related to KFM in the status notifications or logs.
Prevention
To prevent recurrence of this error, ensure that:All Group Policy settings for KFM are correctly configured and match the Azure AD Tenant ID. Use
Get-MgDeviceManagementManagedDevice -Filter "deviceEnrollmentType eq 'windowsAutoEnrollment'" | Select-Object deviceName, operatingSystemto verify device enrollment status.No conflicting folder redirection policies are in place for Documents, Desktop, or Pictures. Review and adjust GPO settings accordingly.
The OneDrive client is kept up-to-date with the latest version that supports KFM policy enforcement.
dsregcmd /status to check the current Azure AD enrollment status and ensure it matches the expected tenant ID configuration.