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

[Bug] Msal Runtime throws user signed out error when calling acquire token silent. #3916

Closed
1 of 7 tasks
trwalke opened this issue Jan 25, 2023 · 5 comments
Closed
1 of 7 tasks

Comments

@trwalke
Copy link
Member

trwalke commented Jan 25, 2023

Logs and network traces
When trying to execute WamUsernamePasswordRequestAsync_WithPiiAsync after the changes in #3859
The following error occurs

Test method Microsoft.Identity.Test.Integration.Broker.RuntimeBrokerTests.WamUsernamePasswordRequestAsync_WithPiiAsync threw exception:
Microsoft.Identity.Client.MsalUiRequiredException: WAM Error

Error Code: 0
Error Message: Account has previously been signed out of this application.
Internal Error Code: 540940121

I cant seem to find this error in our SDK so it looks like it is from WAM. However, it does not make sense. My changes are only affecting local MSAL cache so not sure how calling ATS on WAM can generate this error. There is also an identical test that does not use PII that works fine too.

Test: WamUsernamePasswordRequestAsync_WithPiiAsync - fails
Test: WamUsernamePasswordRequestAsync - passes

image

Both tests are performing a username password auth to sign the user in and they happen one right after another so maybe there is some race condition?

Diff between the two tests

image

Which version of MSAL.NET are you using?

latest
Platform

What authentication flow has the issue?

  • Desktop / Mobile
    • Interactive
    • Integrated Windows Authentication
    • Username Password
    • Device code flow (browserless)
  • Web app
    • Authorization code
    • On-Behalf-Of
  • Daemon app
    • Service to Service calls

Other?

Is this a new or existing app?

Repro

execute the following tests one after another:WamUsernamePasswordRequestAsync, WamUsernamePasswordRequestAsync_WithPiiAsync.

@trwalke trwalke self-assigned this Jan 25, 2023
@trwalke trwalke added this to the 4.50.0 milestone Jan 25, 2023
@trwalke
Copy link
Member Author

trwalke commented Jan 25, 2023

Currently on an email thread with Sam to acquire more info. This may be an external issue

@bgavrilMS
Copy link
Member

Exception thrown is MsalUiRequiredException so this is unlikely to affect existing apps. Marking as P3.

@pmaytak pmaytak modified the milestones: 4.50.0, 4.51.0 Feb 10, 2023
@trwalke trwalke assigned trwalke and unassigned trwalke Feb 15, 2023
@bgavrilMS
Copy link
Member

Blocked on MSAL C++

@gladjohn
Copy link
Contributor

@trwalke this is fixed in MSAL C++. I will update once the new interop is published and this can be validated

@gladjohn
Copy link
Contributor

gladjohn commented Mar 6, 2023

@trwalke you can use Interop version 0.13.6 to verify this fix

@gladjohn gladjohn removed the blocked label Mar 6, 2023
@pmaytak pmaytak added this to the 4.51.0 milestone Mar 7, 2023
@pmaytak pmaytak closed this as completed Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

4 participants