getAccessToken


OfficeRuntime.Auth

This provides a method, getAccessToken that enables the Office application to obtain an access token to the add-in's web application.
Indirectly, this also enables the add-in to access the signed-in user's Microsoft Graph data without requiring the user to sign in a second time.

getAccessToken(options?: AuthOptions: (result: AsyncResult<string>) => void): void; 

The method calls the Azure Active Directory V 2.0 endpoint to get an access token to your add-in's web application.
This enables add-ins to identify users. Server side code can use this token to access Microsoft Graph for the add-in's web application by using the "on behalf of" OAuth flow.
In Outlook, this API is not supported if the add-in is loaded in an Outlook.com or Gmail mailbox.
You will need to add the WebApplicationInfo to your manifest.





© 2021 Better Solutions Limited. All Rights Reserved. © 2021 Better Solutions Limited TopPrevNext