We would like to use Microsoft Authentication for our Office AddIn's for Word and Outlook.
- Microsofts documentation about SSO says: use Office.auth.getAccessToken. I learned that it is not in preview anymore but I cannot use it because my vscode/angular editor does not recognize Office.auth.getAccessToken (intellisense/typescript) resulting in a compile error.
- If we use MSALv2 and we try getting a token with the acquireTokenSilent /acquireTokenRedirect functionality we get an error stating that you cannot run this in an IFrame (which is the case using Office.js)
- If we use MSALv2 with the acquireTokenPopup it runs (for now) in Chrome and Edge. Word AddIn's won't run in newer Safari versions. Furthermore this code does not run in the desktop versions of Office presenting a popup error
- Then there was this article from Microsoft about using displayDialogAsync to host the authentication outside the IFrame. That looked promising until we learned that the newer security functions in Safari would block any response from the external window back to the IFrame.
So... no luck. It did keep us of the streets for a while. It seems impossible to use Microsoft Authentication from a Microsoft Office.js AddIn.
Is there anyone out there who can save the day for us?