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
687 stars 94 forks source link

NAA Dialog fallback does not work #4949

Closed j-jodczyk closed 1 month ago

j-jodczyk commented 1 month 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 1 month 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.

microsoft-github-policy-service[bot] commented 1 month ago

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

microsoft-github-policy-service[bot] commented 1 month ago

This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.