Syncing on-premises SharePoint with OneDrive

So, we now love the OneDrive client. 

We love how it enables us to access SharePoint, Teams and OneDrive libraries from within Windows apps and work with files in Explorer.  And we really love the way we can now link OneDrive with existing Teams and SharePoint Libraries and work with them without syncing.   

The OneDrive client for Windows has come on leaps and bounds in the past few years and now it is good – it wasn’t always good – the Groove sync engine was a disaster – but the “Next Gen” (current) implementation is getting the job done.


What if you want to use OneDrive with SharePoint on-premises?  Good news: SharePoint 2019 works with the current OneDrive clients. Bad news: earlier versions do not. But let’s stay positive. 

So, for the sake of this discussion, you are using OneDrive for Business with Microsoft 365, your identities are synced, and all is well.  However, there is a nagging concern in your mind that one of your colleagues could connect their corporate PC with another OneDrive account from another organisation and accidentally move a bundle of your precious files away to another company.  While it is probably accidentalthis kind of data leakage happens, and your Cyber risk radar is beeping so you want to fix it. 

Luckily, there is a control for it.  The policy “Allow syncing OneDrive accounts for only specific organisations” enables you to configure OneDrive so it will only sync with the Microsoft 365 tenant(s) which you allow.   

Great. Now, what happens if you’ve also you have got SharePoint 2019 in your environment and you would like to sync this too?  Go to SharePoint on-premises, find your library, click Sync and… you get an error. 

[Your IT department doesn’t allow you to sync files from this location to your computer (Error Code: 0x8004deeea)] 


The configuration policy requires a Tenant ID from your Microsoft 365 tenant. SharePoint 2019 on-premises does not have a Tenant ID – so what can you do?

It turns out OneDrive marks the on-premises SharePoint configuration with the tenant ID “OP1”.  You can see it in the registry in Windows by looking into the OneDrive account settings under HKCU.


Adding “OP1” to your AllowTenantList policy alongside your Microsoft 365 tenant ID, will allow your OneDrive client to sync with SharePoint 2019 on-premises.

There are one or two other polices, and some connectivity requirements, relating to using OneDrive with SharePoint 2019 which are documented here:

Hope this is helpful to someone.  Comments and feedback always welcome.

Join the Insentra Community with the Insentragram Newsletter

Hungry for more?