OfficeDev / office-js

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.
https://learn.microsoft.com/javascript/api/overview
Other
673 stars 95 forks source link

NAA Dialog fallback does not work #4949

Open j-jodczyk opened 3 days ago

j-jodczyk commented 3 days ago

Provide required information needed to triage your issue

I was trying to adopt NAA in my Outlook add-in according to this example: https://github.com/OfficeDev/Office-Add-in-samples/tree/main/Samples/auth/Outlook-Add-in-SSO-NAA In the fallback scenario, when getTokenWithDialogApi is used to retrieve the token, the dialog opens to an empty screen and is stuck there. After changing PCA to StandardPublicClientApplication (using createStandardPublicClientApplication instead of createNestablePublicClientApplication here) the login page is displayed.

Your Environment

Expected behavior

The login page is displayed when using NestablePublicClientApplication

Current behavior

The dialog is stuck with blank page. No console logs displayed. When debugging, I can see that the code from fallbackauthdialog.ts is not executed beyond retrieving pca client.

Steps to reproduce

Just try to execute the example https://github.com/OfficeDev/Office-Add-in-samples/tree/main/Samples/auth/Outlook-Add-in-SSO-NAA with getTokenWithDialogApi being the path for getting the token.

Context

Trying to migrate to NAA with all paths working - using the example mentioned as reference.

Thank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.

neprasad-microsoft commented 16 hours ago

Hi @j-jodczyk This issue was fixed with this PR - https://github.com/OfficeDev/Office-Add-in-samples/pull/866 . You can pull in the latest sample code and try again. Please let us know if the issue still persists.