Wednesday, March 28, 2018

Access SharePoint online documents using Microsoft Graph API

Hi,

Microsoft Graph API is one of the great feature which allows to access most of Office 365 services/objects from single endpoint. Recently I was asked to check the possibilities of accessing SharePoint Document libraries using Microsoft Graph API.

Well it is possible, find below the procedures used for accessing the document libraries.

Format:
https://graph.microsoft.com/v1.0/sites/{domain name}:/{named space}/{site collection name}:/drives

Example:
https://graph.microsoft.com/v1.0/sites/kmsys2.sharepoint.com:/sites/accounts:/drives

kmsys2.sharepoint.com: is my SharePoint online domain
accounts: is my SharePoint online site collection
drives: is signature for SharePoint document libraries