You are building a Microsoft Office Add-in for Outlook that will use the Microsoft Graph REST API to retrieve a user's documents from a Microsoft SharePoint Online site.
What should the add-in provide to retrieve the documents on behalf of the user?
Get an access token.
Note: The Outlook REST APIs require a bearer token in the Authorization header. Typically, apps use OAuth2 flows to retrieve a token. However, add-ins can retrieve a token without implementing OAuth2 by using the new Office.context.mailbox.getCallbackTokenAsync method introduced in the Mailbox requirement set 1.5.
After your add-in has the access token, item ID, and REST API URL, it can either pass that information to a back-end service which calls the REST API, or it can call it directly using AJAX.
https://docs.microsoft.com/en-us/office/dev/add-ins/outlook/use-rest-api
Currently there are no comments in this discussion, be the first to comment!