API for OneDrive for Business Sync Client
Please provide an API for the Sync Client of OneDrive for Business. We should have the possibility to programmatically automate the sync of a SharePoint library (for example, from an External Application which already takes offline some DB data we'd like to automatically take offline a related SharePoint Document Library). This for us is very, very crucial.
Tomasz Foltman commented
Hey, is there any update on this? It's almost middle of 2019 and no reliable way to report on status or configure many features of OneDrive.
Get-ODStatus is nice but broken with Files On Demand :/
I wish I could vote more for this.
We're migrating 12,000 desktops 65TB from NetApp (Documents redirection with offline cache) to OneDrive, and leveraging the NGSC OneDrive Sync client -- and there are lots of pain points. One of the biggest is no systematic way monitor the sync client status/health. We desperately need posh sync client module.
For other folks, this helped immensily -- Rodney Viana's Get-ODStatus powershell module which gives us the current status of the OneDrive sync
$syncStatus = Get-ODStatus -bypath $env:ONEDRIVE
### Possible values: Error, Shared, SharedSync, UpToDate, Syncing, ReadOnly, NotInstalled
There are some real positives doing this in late-2017 though:
- long file paths, writing 390 char long paths to C: OneDrive works. wow
- great support for crazy filenames - only problem we've seen are with leading and trailing spaces in filenames ($newName=([System.Web.HttpUtility]::UrlDecode($file.BaseName)).Trim())
- large files - 15GB max sync size is great
- and coming soon, SilentAccountConfig - heck yeah!
- no api client endpoints (posh)
- "cannot access file" crashes (we see when robocopying files into $env:onedrive folders), which explicitly unlink the computer (and which is a real pain when you enforce a standardized OD folder path when most of your users are still using the original default path)
Is there any update on this? I would like to avoid installing external tools like "Ontolica Fusion CtrlSync” and directly use the OneDrive Business Sync Client API.
Steen Jakobsen commented
Maybe this will help or inspire you, although it’s an alternative approach.
“Ontolica Fusion CtrlSync” can remotely sync files in and out of multiple OneDrive for Business accounts, FileShares and SharePoint Sites.
It is controlled from a simple SharePoint List called Subscription, where each List Item defines user, source URL/UNC and a target URL/UNC. In this example, target is the URL for the individual users OneDrive account. The source can be anything from an FileShare UNC, URL to some SharePoint Document Library or even another OneDrive account.
The Subscription List Item have several other properties to define the sync specification like:
Include subfolders, 1-way/2-way operation, Copy/Move/Delete/Sync, Audit retention period, Expiration date.
It runs as a Windows Service and has full tracking and audit logging both to a SharePoint List as well as to a local database.
The setup is customizable and allows for custom rules, for example to set metadata etc.
So, to sum it up, this approach enables you to remotely control file content on multiple users’ OneDrive for Business accounts i.e. “put files there and fetch files”.
You can even sync files to specified “In-Box” folders and fetch updates from another “Out-Box” folders and move/copy to a receiving SharePoint Document Libraries or FileShares.
James Stetson commented
How about this scenario: I have 50 file servers with 20TB of data on them. I migrate these to a series of 50 OneDrive for Business Teams (one for each server). If I had a reliable client API scripting capability, I'd automatically map all 50 of those into the new (beta) OneDrive for Business client that supports Files on Demand. By default, the new client does NOT synchronize all files. It merely provides you the navigation capability of all files on all file servers right from your desktop. I've tested this and it is awesome. It even allows you to navigate folders when you have no network connectivity. if I had a robust client API, I would automatically connect every OneDrive client to all 50 OneDrive sites and let people find the project folders they want to sync as they need them. Having a robust and fully supported Client API would allow me to move all of my servers into the cloud almost immediately.
Marc Collins commented
Run the following in powershell. identify the GrvOpen:// or ODOpen:// URL of the SharePoint library and replace the Value of ($URL = "") with it
$URL = "odopen://"
$IE = new-object -com internetexplorer.application
sleep -milliseconds 50
Paul Martell-Mead commented
It is possible with Powershell to automate the setup of OneDriveForBusiness sync relationships from the client side. You need to create a grvopen:// URL for the library you want to sync then invoke the groove client using this URL. You can then automate the clicking of the Sync Now button using Auto-IT or similar. I have done this for a Onedrive for Business rollout. However the new client will stop supporting Sharepoint libraries and uses a new sync protocol so its a dead end bit of work.
Daniel Kornev commented
Well, AFAIK Groove's Web infrastructure has been either removed, or under the life support.
The only part of Groove platform that was left was its client app on Windows that allowed synchronization of data from SharePoint to local drives. Other functionality (e.g., full Groove Workspaces, Contacts, etc.) was cut from Groove's client in 2013 version.
The scenario we strongly believe is needed is simple:
1. User gets account in O365
2. User downloads a third party app that provides access to ODfB
3. 3rd party app automatically installs ODfB client to user's PC/Mac if it wasn't installed,
4. Once user chooses one or more locations to sync in the 3rd party app (e.g., ODfB or custom locations like SharePoint libraries), 3rd party app invokes ODfB client API to request synchronization of that location (locations)
Daniel D Moore commented
Couldn't agree more that this is a necessary feature for OneDrive, and SharePoint services. If the Groove Web Services SDK http://j.mp/1EJ9uR5 can do it, why couldn't it just be direct to each individual service?
Daniel Kornev commented
Same request goes in support for users of our product, Zet Universe. With API for OneDrive for Business sync client, we could help our users to have offline story with their OneDrive for business data.