Skip to main content

Posts

Showing posts from November, 2016

Office 365 / SharePoint Integration

In an earlier post, I described my attempt to save some generated excel documents to OneDrive using OAUTH 2.0 client_credentials through the Graph API. That blog post is located here . OneDrive is for individual use. In our organization, we also use SharePoint. SharePoint 365 also uses OneDrive for its backend file system. However, Microsoft has different APIs to save data into SharePoint sites through its Office 365 APIs. This blog post will explain how you can configure your Azure Portal and Office 365 to save documents to SharePoint programatically. Overview of Technical Approach Office 365/SharePoint provide OAUTH 2.0 enabled APIs for access. In order to use such APIs, applications need to be registered with our Azure Management Portal. Once applications are registered, OAUTH 2.0 with client certificates will be used to eliminate user consent flow as we will be using these APIs programmatically by back-end applications. There will be no end-user logging into SharePoint. Here

Office 365 / OneDrive Integration - Microsoft Graph API with OAUTH 2.0 client_credentials grant type

I recently had the opportunity to use Office 365 / OneDrive. I was trying to programmatically save some generated (excel) documents to a folder in SharePoint / OneDrive using a back-end Java utility. Hopefully, this write up captures all of the details of how I was able to accomplish it.  Overview of Technical Approach Office 365 and OneDrive provide OAUTH 2.0 enabled APIs for access. In order to use such APIs, applications need to be registered with Azure Management Portal. Once applications are registered, OAUTH 2.0 grant_type of client_credentials can be used to eliminate user consent flow as you can use these APIs programmatically by back-end applications.  There will be no end-user logging into OneDrive. Here is the documentation provided by OneDrive that talks about how to create and register your application in order to use these APIS.  https://dev.onedrive.com/app-registration.htm#register-your-app-for-onedrive-for-business Once an application is registered client_id