Share via

How to get getAccessToken() function alternative in the outlook web add-in?

Neha Sevlani 26 Reputation points
2023-01-10T12:34:04.35+00:00

I wanted to use Microsoft graph API for my outlook add-in. ( I have this working in the web app as well as in the outlook desktop app).

I have tried multiple ways to achieve this flow but everything has some limitations that either won't work on the web app or on the desktop.

Apart from all other ways I find SSO methods more promising. ( https://learn.microsoft.com/en-us/office/dev/add-ins/develop/authorize-to-microsoft-graph ) but in that, it suggests using getAccessToken() function which is not supported in the outlook web app. ( https://learn.microsoft.com/en-us/javascript/api/office/office.auth?view=common-js-preview )

Can anyone please help how can I get Token A in the case of web apps ( OBO flow )? or if any other flow will be more suitable for this requirement?

Microsoft Security | Microsoft Graph
0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.