A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
Sorry if im using the wrong place to ask this question but i already tried on Microsoft Q&A but my question is getting perma blocked by some automated task.
Hi everyone, I'm developing an outlook addin where i need to get an access token to fetch graph apis.
I followed the react office addin graph auth microsoft's guide and everything is working fine, indeed i successfully get an access token and can consume graph api without any problems.
My main concern is that the only way i succeed at getting the access token is by using Office.context.ui.displayDialogAsync which opens a dialog where after the user interacted with it opens a popup which correctly gives me back the access token.
There is any way i can avoid the user repeating this process over and over again?
The perfect scenario would be that the user opens the addin, click on the confirm dialog and when he closes and reopen it he doesn't have to click again on the dialog box.
Sorry if im using the wrong place to ask this question but i already tried on Microsoft Q&A but my question is getting perma blocked by some automated task.
Hi everyone, I'm developing an outlook addin where i need to get an access token to fetch graph apis.
I followed the react office addin graph auth microsoft's guide and everything is working fine, indeed i successfully get an access token and can consume graph api without any problems.
My main concern is that the only way i succeed at getting the access token is by using Office.context.ui.displayDialogAsync which opens a dialog where after the user interacted with it opens a popup which correctly gives me back the access token.
There is any way i can avoid the user repeating this process over and over again?
The perfect scenario would be that the user opens the addin, click on the confirm dialog and when he closes and reopen it he doesn't have to click again on the dialog box.
Your Environment
Expected behavior
I would love that somehow the user is not forced to always click on the dialog in order to get graph token
Current behavior
The user is always forced to click on the dialog to get graph token.
this is my code if may help you.
this is my login.html page
and this is login.ts