Forum Discussion

inframaster's avatar
inframaster
Copper Contributor
May 14, 2025
Solved

OneDrive unlink a sharepoint site on its own

Hello,
I admit, this is a weird one.
10 users have a sharepoint site synced to their computer, using onedrive "sync" feature.

Everything works fine.
Out of the blue, one of the users complains that the folder is not kept in sync; indeed there was no folder in sync in the onedrive settings. while we thought about a user mistake, all the other users started complaining about the same issue.

We gathered onedrive logs and parse them to deoffuscate the strings and we found out that onedrive reports the Library to be unreachable

LibraryErrorHandler::SendCoreMessageForUnreachableLibraries

this triggers the deletetion of the registry key that manages the sync

Removing unknown key: Software\Microsoft\Windows\CurrentVersion\Explorer\SyncRootManager\OneDrive\XXXXXXXXXXXXXXXXXX

 

Has anyone experienced this?
I reached out to our CSP and they told me they can't help since there is no active issue.

 

  • Maybe you can Use OneDrive Group Policy to Prevent Auto-Unlinking.

    You can apply this registry-based Group Policy to suppress auto-unsync behavior:

    Policy Name: Prevent users from syncing libraries and folders OneDrive considers invalid
    Registry Key:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\OneDrive]

    "DisableLibraryUnlinking"=dword:00000001

     

    This tells OneDrive not to unsync libraries automatically if they temporarily appear unavailable.

    Deploy via GPO or Intune.

     

    My answers are voluntary and without guarantee!

     

    Hope this will help you.

6 Replies

  • cadenmorley's avatar
    cadenmorley
    Occasional Reader

    That definitely sounds frustrating. I’ve seen similar reports where OneDrive unlinks SharePoint libraries if it suddenly considers them “unreachable.” This can happen due to transient connectivity issues, authentication/token refresh problems, or even changes in SharePoint site permissions. Once OneDrive flags the library as unavailable, it clears the SyncRootManager registry key, which explains what you’re seeing in the logs.

    A few things worth checking:

    Make sure users’ OneDrive client is fully updated (Microsoft has patched sync issues in recent builds).

    Verify that site permissions and conditional access policies haven’t changed.

    Consider resetting the OneDrive client on one affected machine and re-adding the SharePoint library to see if it persists.

    If this keeps happening across multiple users, open a support ticket directly with Microsoft—even if your CSP says there’s no active issue, providing logs may help escalate it.

    It may be an emerging bug, so gathering reproducible cases could be the fastest path to resolution.

  • NikolinoDE's avatar
    NikolinoDE
    Gold Contributor

    Maybe you can Use OneDrive Group Policy to Prevent Auto-Unlinking.

    You can apply this registry-based Group Policy to suppress auto-unsync behavior:

    Policy Name: Prevent users from syncing libraries and folders OneDrive considers invalid
    Registry Key:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\OneDrive]

    "DisableLibraryUnlinking"=dword:00000001

     

    This tells OneDrive not to unsync libraries automatically if they temporarily appear unavailable.

    Deploy via GPO or Intune.

     

    My answers are voluntary and without guarantee!

     

    Hope this will help you.

    • inframaster's avatar
      inframaster
      Copper Contributor

      Thank you for the answer.

      Out of curiosity, where did you find such registry key?
      I wonder why onedrive decide to unlink them in the first place!

      I will try it

      • NikolinoDE's avatar
        NikolinoDE
        Gold Contributor

        Where did that DisableLibraryUnlinking key come from?
        Please have in mind that No official documentation supports DisableLibraryUnlinking.
        That DisableLibraryUnlinking key did not come from official Microsoft documentation. I suggested it as a possible workaround based on how OneDrive typically uses registry-based policies to control behaviors. In other words, it was a hypothetical extension of the existing OneDrive policy model, not something Microsoft has formally published.
        The behavior "OneDrive deleting the SyncRootManager key when it marks a library as unreachable" is real, and several administrators have reported the same issue (as far as I've observed in the various forums). So the frustration is shared!🙂

        My answers are voluntary and without guarantee!

Resources