OneDrive error 0x8004DEF4 on one RDS Session Host only

Dom 0 Reputation points
2026-10-05T06:28:58.6266667+00:00

Environment:

  • Windows Server 2025
  • 2x RDS Session Hosts
  • WTS1 is also Connection Broker
  • WTS2 has Microsoft Entra Connect Synchronization Services (Azure AD Connect) running (not optimal i know)
  • FSLogix Profile Containers
  • OneDrive for Business
  • Microsoft 365 Apps
  • Apps and Windows Versions are identical
  • System is running for over a year now

 

Problem:

Users received OneDrive error 0x8004DEF4 only on WTS2, about a week ago for the first time

The same users work fine on WTS1.

 

What has already been done:

  • Office Online Repair
  • OneDrive completely removed and reinstalled
  • Same OneDrive version on both hosts
  • Same Office version on both hosts
  • No relevant errors in Application/System logs
  • AAD 1098 TokenBroker errors exist on BOTH hosts
  • FSLogix profiles are shared between both hosts
  • GPOs are identical
  • Disconnecting user from all active sessions in MS365 administration
  • bot devices are AzureADjoined
  • deleted onedrive folder under appdata for a user on both devices

 

Interesting observation:

Deleting %localappdata%\Microsoft\OneDrive\settings immediately fixes the issue on WTS2

 If users stay on, or get reconnected to WTS2, OneDrive continues to work fine

 

The issue becomes reproducible when:

  1. User signs in to WTS2
  2. OneDrive works
  3. User signs in to WTS1 (onedrive always works here, no error ever)
  4. User returns to WTS2
  5. OneDrive throws 0x8004DEF4 again

 

I can reproduce this repeatedly.

No triggering event could be identified.

 

There were no corresponding changes around the time the problem began:

 

  • No recent Windows updates (latest September Updates installed on Sept. 12th)
  • No recent Office updates
  • No recent OneDrive deployment
  • No recent Entra Connect installation or update
  • No recent GPO changes

 

Application and System event logs were reviewed and do not contain any errors that correlate with the onset of the issue.

 

The only recurring errors found were AAD Event ID 1098 entries, however these occur on both WTS1 and WTS2 and therefore do not appear to be related to the issue.

Sorry for the long post, but me and copilot are at the end of the road. I don't know what to do anymore. Please help.

 

Windows for business | Windows Client for IT Pros | User experience | Remote desktop services and terminal services
0 comments No comments

2 answers

Sort by: Most helpful
  1. Dom 0 Reputation points
    2026-10-05T09:03:16.6066667+00:00

    Hi there!

    Thx for the answer first of all!

    HKLM\SOFTWARE\FSLogix\Profiles\ IncludeOneDrive - does not exist on both wts - all other entries are identical

    I saved the log folder after the error, but to be honest, i have no clue what to do with the odl files or the sync-log.

    Was this answer helpful?

    0 comments No comments

  2. Harry Phan 33,720 Reputation points Independent Advisor
    2026-10-05T07:10:03.7666667+00:00

    Hello Dom,

    Sorry to hear you're facing a tough issue. Here are my analysis and suggestions:

    The strongest lead is the FSLogix-roamed OneDrive state, not the OneDrive installation. Microsoft explicitly states that IncludeOneDrive=1 redirects the OneDrive cache into the profile container, but OneDrive does not support multiple simultaneous connections using the same profile, which closely matches your WTS1 → WTS2 reproduction pattern.

    I would first verify HKLM\SOFTWARE\FSLogix\Profiles\IncludeOneDrive and the FSLogix version/configuration on both hosts, then reproduce the issue with a brand-new FSLogix profile. If the new profile works across WTS1/WTS2, the existing container's OneDrive/identity state is the likely culprit; Microsoft confirms that OneDrive, TokenBroker, OneAuth and IdentityCache can reside in FSLogix-managed profile data.

    When the error occurs, do not immediately delete settings; collect %LocalAppData%\Microsoft\OneDrive\logs first, then use the settings reset as a workaround. Microsoft confirms 0x8004DEF4 can have several causes, so the logs are needed before identifying a definitive root cause. I would also move Entra Connect off WTS2 when possible, although there is currently insufficient evidence to call it the cause.

    Let me know if it works.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.