Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outlook-Add-in-SSO-NAA worked only once. I can't get any token anymore #818

Open
canturan opened this issue Jul 17, 2024 · 4 comments
Open

Comments

@canturan
Copy link

Note: This repo is only for questions related to its samples. If you have questions about how to use office.js or the Office developer platform, please post your question on https://stackoverflow.com. Tag your question with office-js or outlook-web-addins

Question

I was testing the NAA configuration with the Outlook-Add-in-SSO-NAA sample. After I followed the steps and started the application, the get user button opened a popup, where I consented the permissions for my tenant and the graph call worked.

But when I start the application again, I can get any token anymore:

this.pca.getAccount on the initilize return undefined for the account

On the method "ssoGetUserIdentity", because the this.account is undefined, the this.pca.ssoSilent is called, which returns the following error:

'ServerError\n at NestedAppAuthAdapter.fromBridgeError (https://localhost:3000/taskpane.js:13261:28)\n at NestedAppAuthController.acquireTokenSilentInternal (https://localhost:3000/taskpane.js:6960:53)\n at async AccountManager.ssoGetUserIdentity (https://localhost:3000/taskpane.js:315:12)\n at async HTMLButtonElement.getUserData (https://localhost:3000/taskpane.js:451:23)'

Then on the catch block, the application tries to login the user with this.pca.acquireTokenPopup which return the following error on the popup window.

image

I did not change anything on the sample. It worked on the first run then not anymore. Could please help me?

Thanks!

@canturan canturan changed the title Outlook-Add-in-SSO-NAA just worked only once. I can get any token anymore Outlook-Add-in-SSO-NAA just worked only once. I can't get any token anymore Jul 18, 2024
@canturan canturan changed the title Outlook-Add-in-SSO-NAA just worked only once. I can't get any token anymore Outlook-Add-in-SSO-NAA worked only once. I can't get any token anymore Jul 18, 2024
@AlexJerabek
Copy link
Collaborator

Thanks for reporting this @canturan.

@davidchesnut, could you please take a look?

@davidchesnut
Copy link
Member

Hi @canturan,

Sorry you ran into this issue. This is a product bug we're working to fix soon. We'll post an update here once the fix is available.

@canturan
Copy link
Author

@davidchesnut : Thank you for the update.

In the meantime, I found a workaround but mybe the information could help you to figure out the issue.

I set up a complete new dev VM, joined it to Entra ID of my dev tenant then set up Outlook etc. In this combination, everything works as expected.

But if I try to test it in a maschine which logged in with Microsoft account and I am logged in to Office + Outlook with my M365 Work account then I can reproduce the issue which I explained in my first message.

@davidchesnut
Copy link
Member

Hi @canturan,

Can you please confirm if you are still seeing this issue? Should be fixed now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants