6
votes

Just getting into Office 365 using the ADAL js libraries using the implicit flow. I followed the tutorial on github but I can't seem to find a way to also be able to discover the files located inside of the sharepoint site runnign on my office 365 subscription. It only ever picks up the onedrive attached to my developer account.

Is it possible to gain access to the sharepoint files api without re-logging the user in, say by getting another access token through our current token which works with my onedrive files?

I've tried hitting the /me api on my sharepoint using my office365 bearer token but I get the error back:

Invalid audience Uri '3c8b5ba9-0c5f-406c-xxxx-xxxxxxxxxxxx'.

the above ID is from my application's client id

1
What files are you looking for, are it just sharepoint lists or?mrhn
the files stored in sharepointMichael Crook

1 Answers

0
votes

Have you seen this post by Andrew Connell? It covers using ADAL.js to access Office 365's Files API and SharePoint's REST API.

http://www.andrewconnell.com/blog/adal-js-cors-with-o365-apis-files-sharepoint