OneDrive for Business Document Synchronization with File Server or SharePoint

 

Documents in OneDrive for Business can be centrally synchronized with local file servers or SharePoint using the Layer2 Cloud Connector, one-way (for migration and backup) or even two-way if required. Though primarily used for syncing files to the main OneDrive document library, documents and data can also be synced to other SharePoint lists and libraries created within OneDrive. Please take a look here for supported source systems and applications to integrate.​​​

 

To connect to OneDrive for Business, the data source or destination entity must be configured as follows in the Layer2 Cloud Connector Connection Manager.

 

Example of how to sync data with OneDrive for Business

Fig. Example connection configuration to connect and sync data with OneDrive for Business.

Getting the Correct URL for OneDrive Locations

 

Default Documents Location in OneDrive

 

With the newer UI in OneDrive for Business, the home page does not show the right URL needed to connect via the Cloud Connector. To get the the right URL for your "Files" or "Documents" location:

 

1. Click on "Return to classic OneDrive" in the lower left-hand corner.

 

One Drive new UI

 

 

2. When the older UI reloads, the URL now in the browser is the correct one to use with the Cloud Connector. It should look something like this:

https://company-my.sharepoint.com/personal/myAccount/Documents/Forms/All.aspx

 

Other Libraries or Lists in OneDrive

 

If you want to use another library in your OneDrive, you can get the correct URL by navigating to the location, opening the List/Library Settings and looking at the "Web Address:" given at the top of the settings page. That is the URL you will need for the connection string to this location.

 

If you are having trouble finding other content in your OneDrive location, you can click on the Cog-like icon near your account name in the upper-right corner and select Site settings from the list of options. Then under "Site Administration", select Site libraries and lists, which will show all items currently in the OneDrive as well as allow you to create new ones. The site content may also be listed in the left column of that page, if your UI configuration allows it.

OneDrive for Business Specific Integration Settings

 

Please note the following specific settings.

 

  • Select the Layer2 Data Provider for SharePoint (CSOM) to connect. The provider is part of the Layer2 Cloud Connector ADO.NET provider package and should be already installed. You will find a SharePoint Data Provider specification here.
  • You can use a connection string like this to connect:
    url=http://mydomain.com/mySite/myLibrary/Forms/All.aspx; Authentication=Office365; [email protected]; Password=myPassword;
  • The URL=; parameter will be the full URL found in the steps above for "Getting the Correct URL for OneDrive Locations".
  • Chosing the right authentication method is very important. Office365, ADFS, and others are supported. See specification linked above for more details.
  • Data queries are not supported. Please make use of SharePoint views to select your data.
  • In case of default Documents library, files are synchronized as well as metadata. List are for metadata only, attachments are not supported at this time.
  • You can map your data fields to specific external fields in the Layer2 Cloud Connector. Please take care about data types (simple type conversions are supported). If fields are not available, please check your view.
  • The primary key will be set automatically to the SharePoint item ID.
  • You can use the connection for uni- or bi-directional synchronization. In case of inserts (full CRUD) via external systems, please take care that the primary key is set appropriately.
  • No installation or changes are required at the data source or data destination, e.g. on OneDrive for Business.
  • Data synchronization can be started manually in the Connection Manager, per command line or scheduled in background by the Layer2 Cloud Connector Windows Service. Only data changes are processed (no delete / bulk import).
  • To sync many OneDrive libraries automatically (e.g. for several different users or departments) you can use PowerShell to script the sync process.
  • No programming required for setup a connection and sync.
  • No need to open your local network for access from outside.

OneDrive for Business Sync - Known Issues and Workarounds

 

For OneDrive for Business Integration via Layer2 Cloud Connector, we have found the following issues and workarounds:

 

  • Synchronization to or from a SharePoint Asset Library is not supported.
  • SharePoint list attachments are not managed at this time and are not supported.
  • The "New UI" for OneDrive gives an incorrect URL for the default file library that you cannot use with the Cloud Connector. Use the instructions above in "Getting the Correct URL for OneDrive Locations".
  • OneDrive fo Business supports files up to 10GB. Larger files will be rejected.​ (See SharePoint Online software boundaries and Limits for more information.)
  • For other OneDrive restrictions (file names, file types, etc.), see Restrictions and limitations when you sync SharePoint libraries.
  • For file syncing to OneDrive, it is recommended you "clean" your file system source for restricted filenames, folders, and other items not allowed in OneDrive before the first sync. For more information, see How to fix sync issues between local file shares and OneDrive for Business, which includes a link to Microsoft's free "Easy Fix" tool that will check your file system for these issues.

Step-by-Step Intros For OneDrive for Business Document Synchronization

 

Where to go next:

 

 

Can't find what you are looking for? Take a look here or contact [email protected] for any help.

FIND RELATED SOLUTIONS HERE.

Learn more about similar solutions for data migration, backup, integration, and synchronization by vendor and topic.

Ready to go next steps?

Register for free download.

Keep your Sharepoint in sync. Download and try today

Questions? Contact us.

We are here to help. Contact us and our consulting will be happy to answer your questions.