Connect to OneDrive and OneDrive for Business with the Same API

 In Article, CloudRail

OneDrive API and OneDrive for Business API Combined in a Single API

Microsoft’s Cloud Storage solution OneDrive is available in two versions, the consumer version OneDrive and OneDrive for Business which is more focused on enterprise customers. There are plenty of use cases where it makes sense to integrate those directly via the API into your application. Most developers think that integrating the normal OneDrive API is enough to cover all Microsoft cloud customers but this is unfortunately wrong. The business version, which is of course important if you not only target consumers, needs to be integrated via the so called OneDrive for Business API. And how else should it be, those APIs are not the same. In this article we show you how to use the CloudRail solution to nonetheless integrate both services via the same API.

What is the Difference Between the OneDrive API and the OneDrive for Business API?

It’s mainly the base URL and the authentication process. With OneDrive, no matter which user has been authenticated via standard OAuth2.0, all requests are made against the same API base URL. With OneDrive Business on the other hand that base URL varies dependent on the authenticated user’s ‘tenant’. Consequently, authentication with OneDrive Business is an extension of the standard OAuth 2.0 and needs one more step where this variable base URL is ‘discovered’ to be used with all subsequent requests.

Use CloudRail to Integrate OneDrive and OneDrive for Business via the Same API

CloudRail with its API Integrations Solution allows you to integrate OneDrive and OneDrive for Business through a so called Unified API. This means that the solution puts an abstraction layer over the two APIs and provides a unified interface which works exactly the same for both APIs. So just integrate one single API and access OneDrive and OneDrive for Business through a common interface. Here are some code snippets to show you how:

CloudRail currently offers an Android SDK, Objective-C SDK (iOS), Swift SDK (iOS), Node.js SDK and Java SDK with more to follow soon.

CloudRail for Other Providers

The good news is that CloudRail works even across multiple vendors. So you don’t only get OneDrive and OneDrive for Business via a single API, but also Dropbox, Google Drive, Box and more. This is how you use it:

But isn’t CloudRail a Single Point of Failure?

No. CloudRail uses an SDK which resides with your application. All data then flows directly between your app and, for example, OneDrive. No data ever touches a CloudRail server and thus it can’t go down.

How to Get Started

Learn more about CloudRail or sign-up for a free account.

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)
Loading...
Recent Posts