Last week at Ignite it was announced that finally Microsoft was bringing O365 SharePoint access to the Microsoft graph as an API. This is a huge deal for those of us who want to use O365 as a platform and develop engaging applications for customers. In my case for Office Add-ins this is great because it reduced the number of OAuth hoops I have to jump through and manage to get the data I want.
Here is a link to the documentation: Working with SharePoint sites in Microsoft Graph and a quick example.
NOTE: this is beta and will change – this is purely a demonstration of what is possible today (Oct 2016) and not to be used as future reference.
Using the graph explorer demo I am able to bring up content from my default SharePoint site very easily
Here is my copper site within my SharePoint tenant
and here it is referenced from the graph API
here is the API response of the lists
and here is a reference to the documents in the Shared Documents folder
How cool is that !!!!!