Forum Discussion
Ivan54
Dec 02, 2016Bronze Contributor
Disable OneDrive Offline Sync for SharePoint Libraries
Is there a way to keep offline sync enabled for personal OneDrive for Business libraries, but disable it generally for TeamSite libraries, and possibly enable it only for specific libraries? Or do y...
Dec 02, 2016
Yeap, you can do it per library basics and in order to automate I'm pretty sure you can write some PowerShell code to do it using CSOM....as an example: http://www.sharepointdiary.com/2014/09/how-to-disable-sync-button-in-sharepoint-2013.html (the PowerShell is not valid because is for server side)
- DeletedDec 02, 2016
Last time my team looked at this, there was no API (PowerShell, CSOM, etc.) that would allow you to do this. We had to write some custom code to mimic the get/post requests for the advanced settings page of a library in order to turn off "offline client availability".
Since our users could turn it back on at any point, we have to run our utility continuously in order to keep it disabled.
- Richard BourkeDec 02, 2016Iron ContributorThe ExcludeFromOfflineClient property is available via the API now, as of version 16.1.5715.1200 I believe. If users can re-enable the setting you will still have to disable it frequently unfortunately.
- VesaJuvonenDec 05, 2016
Microsoft
Like Richard mentioned, we released following property for CSOM in the SPO NuGet package back in August
- public property Microsoft.SharePoint.Client.List.ExcludeFromOfflineClient
https://dev.office.com/blogs/new-sharepoint-csom-version-released-for-Office-365-august-2016-updated. That should do the trick.
- Dec 02, 2016
I think you are right and it's not possible yet to configure this setting using CSOM...adding VesaJuvonen so he can add his comments here