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
AcquireTokenInteractive continuously returns MsalClientException after user closes Embedded Web window #4658
Comments
Hi @alexherbert, Are you able to provide MSAL verbose logs |
False MSAL 4.59.0.0 MSAL.Desktop 4.8 or later Windows 10 Enterprise [2024-03-11 19:46:19Z] [Internal cache] Total number of cache partitions found while getting refresh tokens: 0 False MSAL 4.59.0.0 MSAL.Desktop 4.8 or later Windows 10 Enterprise [2024-03-11 19:46:19Z - de80f8eb-0ac2-4fe8-a34b-ca62e892b924] === Token Acquisition (SilentRequest) started: at Microsoft.Identity.Client.Internal.Requests.Silent.SilentRequest.d__5.MoveNext() False MSAL 4.59.0.0 MSAL.Desktop 4.8 or later Windows 10 Enterprise [2024-03-11 19:46:20Z - f7b12d35-def5-4163-8357-8e88f3a05378] False MSAL 4.59.0.0 MSAL.Desktop 4.8 or later Windows 10 Enterprise [2024-03-11 19:46:20Z - f7b12d35-def5-4163-8357-8e88f3a05378] === Token Acquisition (InteractiveRequest) started: Authority Host: login.microsoftonline.com at Microsoft.Identity.Client.Internal.AuthCodeRequestComponent.VerifyAuthorizationResult(AuthorizationResult authorizationResult, String originalState) |
Library version used
Microsoft.Identity.Client 4.59.0
.NET version
.NET Framework 4.8
Scenario
PublicClient - desktop app, Other - please specify
Is this a new or an existing app?
None
Issue description and reproduction steps
Integrating MFA into WPF application
If the user closes the Embedded Web window during MFA and therefore does not complete MFA process, then a MsalClientException is thrown every time the the application is relaunched and tries to AcquireTokenInteractive. This will often happen for a number of times. Sometimes it will eventually show the Embedded Web window but often gets stuck in the user_canceled AuthorizationState. Is there a way to reset this and why is it happening?
Relevant code snippets
Expected behavior
Embedded Web window should be launched when AcquireTokenInteractive is called.
Identity provider
Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)
Regression
No response
Solution and workarounds
No response
The text was updated successfully, but these errors were encountered: