Unable to Sync SharePoint On-Prem document libraries with OneDrive Sync Client

Probem Description

Users may not be able to to sync Document Libraries with SharePoint On-Prem with error 0X8004e4f1.

When attempting to sync, the following error occurs:

“Your OneDrive has not been setup”
For help, contact your IT department. (Error Code: 0X8004e4f1)

Example:

Cause

When establishing a Sync connection to a Document Library, the OneDrive Sync client makes the API call “/_api/sp.userprofiles.peoplemanager/getmyproperties” , which attempts to read the user’s profile info and configure sync policies.

Example:

If the “Personal Site” location is inaccessible, the error “0X8004e4f1” will occur.

This error is essentially a 404 – “Not Found”, when attempting to access the users my site.

Example:

Resolution

To resolve this issue, ensure my Mysites are configured properly and the URL is accessible.  Also, make sure the “HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\OneDrive SharePointOnPremFrontDoorUrl”, is configured with the same URL of the site where the Document Library is located.

Example:

More Information

While establishing a sync connection to a document Library, OneDrive attempts of locate user level sync policies to correctly configure the sync configuration.

To read the policy, the following calls are made during the sync setup process:

Here is a breakdown of the process:

  1. Locate Mysite URL – http://spwfe/_api/sp.userprofiles.peoplemanager/getmyproperties
  1. Get mysite Default Document Library ID – http://spwfe/my/personal/user1/_api/web/DefaultDocumentLibrary/ID
  1. Get Users MySite ID – http://spwfe/my/personal/user1/_api/Site/Id
  1. Get users sync policy – http://spwfe/my/personal/user1/_api/SPFileSync/sync/383cc5d6-7737-432e-a580-6882c62741c7/policy/

Here is an example of the XML response:

<PolicyDocument xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance Id=”SkyDriveSyncV1″>
<RangeRule Name=”PolicyDocumentPollIntervalSeconds” Start=”21600″ End=”28800″/>
<RangeRule Name=”PolicyDocumentPrefetchIntervalSeconds” Start=”3600″ End=”7200″/>
<RangeRule Name=”BackgroundPollShortIntervalSeconds” Start=”90″ End=”110″/>
<RangeRule Name=”BackgroundPollLongIntervalSeconds” Start=”7200″ End=”10800″/>
<Rule Name=”UploadBlockSizeKB” Value=”8160″/>
<Rule Name=”DownloadBlockSizeKB” Value=”8160″/>
<Rule Name=”MaxClientRequestsPerDay” Value=”2500000″/>
<Rule Name=”MaxClientMBTransferredPerDay” Value=”1048576″/>
<Rule Name=”MaxFileSizeBytes” Value=”10737418240″/>
<Rule Name=”HighVisibilityFileExclusionList” Value=”*.| *|* |*_vti_*|~|~site|~sitecollection|~masterurl|~templatepageurl”/>
<DavUrlMatches>
<DavUrlMatch>^http:\/\/spwfe\/my\/personal\/user1\/Documents((\/.*)?)</DavUrlMatch>
</DavUrlMatches>
<Rule Name=”DavUrlTemplate” Value=http://spwfe/my/personal/user1/Documents/{Path}/>
<Rule Name=”ShareUrlTemplate” Value=http://spwfe/my/personal/user1/_layouts/15/SkySyncRedir.aspx?Type=1&ResourceId={ResourceID}/>
<Rule Name=”ShareUrlTemplateV2″ Value=http://spwfe/my/personal/user1/_layouts/15/SkySyncRedir.aspx?Type=3&ResourceId={ResourceID}/>
<Rule Name=”OfficeExcludeList” Value=”|”/>
<Rule Name=”WacUrlTemplate” Value=http://spwfe/my/personal/user1/?d=w{ResourceID}&cid={hexcid}/>
<Rule Name=”SkyDriveURI” Value=http://spwfe/my/personal/user1/_api/SPFileSync/sync/383cc5d67737432ea5806882c62741c7/RootFolder/>
<Rule Name=”SkyDriveItemsURI” Value=http://spwfe/my/personal/user1/_api/SPFileSync/sync/383cc5d67737432ea5806882c62741c7/Items/{ResourceID}/>
<Rule Name=”QosCollectionEnabled” Value=”False”/>
<Rule Name=”HashAlgorithm” Value=”XORHash”/>
<Rule Name=”DavUrlNamespace” Value=http://spwfe/my/personal/user1/Documents//>
<Rule Name=”MaxUrlLength” Value=”400″/>
<Rule Name=”MaxInlineUploadSizeKB” Value=”4080″/>
<Rule Name=”StorageManagementURI” Value=http://spwfe/my/personal/user1/_layouts/15/storman.aspx/>
<Rule Name=”ViewOnlineUrlTemplate” Value=http://spwfe/my/personal/user1/_layouts/15/SkySyncRedir.aspx?Type=2&ResourceId={ResourceID}/>
<Rule Name=”DownloadUrlTemplate” Value=http://spwfe/my/personal/user1/_layouts/15/download.aspx?UniqueId={ResourceID}/>
<Rule Name=”DownloadStreamingMaxStreamSizeKB” Value=”102400″/>
<Rule Name=”RecycleBinURI” Value=http://spwfe/my/personal/user1/_layouts/15/onedrive.aspx?view=5/>
<Rule Name=”DisableReportProblemDialog” Value=”False”/>
<Rule Name=”WebPushAppServerPublicKey” Value=”BCa8p3WDa3EGdSLl+h4Z7tMog9Iojr4J4z7LufKDhdgGQ+7ZeKTHgqhQr9F3b3J0ZG+smlTGq6US394FZ9Xvw4E=”/>
<Rule Name=”CollabVectorClockURI” Value=http://spwfe/my/personal/user1/_api/SPFileSync/sync/383cc5d67737432ea5806882c62741c7/CollabVectorClock/{ResourceID}/>
<Rule Name=”SiteTitle” Value=”user1″/>
<Rule Name=”LibraryTitle” Value=”Documents”/>
</PolicyDocument>

Addtional Reading

Configure hybrid OneDrive – SharePoint Server | Microsoft Docs

Configure syncing with the new OneDrive sync app for SharePoint 2019 – SharePoint Server | Microsoft Docs

Configure My Sites in SharePoint Server – SharePoint Server | Microsoft Docs

Leave a Reply