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] Can not login with MSAL on Virtual Machine after updating MSAL.NET packages from 4.59.0 #4974

Open
AnzarN opened this issue Oct 23, 2024 · 6 comments
Assignees
Labels
needs attention Delete label after triage public-client untriaged Do not delete. Needed for Automation

Comments

@AnzarN
Copy link

AnzarN commented Oct 23, 2024

Library version used

Microsoft.Identity.Client.Broker 4.61.0 and Microsoft.Identity.Client.Extension.Msal 4.61.0

.NET version

.net 8.0
WinAppSDK 1.6 (It is not working in WinAppSDK 1.5 as well)

Scenario

PublicClient - desktop app

Is this a new or an existing app?

The app is in production, and I have upgraded to a new version of MSAL

Issue description and reproduction steps

Login is working on physical machine, but on virtual machine, MSAL dialog open but can't login, after clicking on email from list, the dialog close but there is no further process, if Microsoft.Identity package version is more than 4.59.0
If I downgrade version to 4.59.0 it is working fine.

Relevant code snippets

No response

Expected behavior

It should work even if I update package to more than 4.59.0 version.

Identity provider

Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)

Regression

4.59.0

Solution and workarounds

Downgrade to version 4.59.0 working fine, issue with version more than 4.59.0

@AnzarN AnzarN added needs attention Delete label after triage untriaged Do not delete. Needed for Automation labels Oct 23, 2024
@iulico-1
Copy link
Contributor

@AnzarN, Did your app enabled broker flows recently? Are you running your application elevated (as Administrator) on your Virtual Machine?

@AnzarN
Copy link
Author

AnzarN commented Nov 6, 2024

@iulico-1, Yes I have enable broker flow in my app but I am not running my app as Administrator on my Virtual Machine

@iulico-1
Copy link
Contributor

iulico-1 commented Nov 6, 2024

@AnzarN , please share a screenshot of the UX you select account from ? Are you getting an exception from MSAL.net ?

@AnzarN
Copy link
Author

AnzarN commented Nov 7, 2024

MSAL.issue.mp4

In this recording, I have recorded issue and exception as well.

@iulico-1
Copy link
Contributor

@AnzarN, please share the content of AdditionalExceptionData and the full content of StackTrace from the exception.

@AnzarN
Copy link
Author

AnzarN commented Nov 13, 2024

Here is the StackTrace and AdditionalExceptionData

StackTrace:
at Microsoft.Identity.Client.Platforms.Features.RuntimeBroker.WamAdapters.HandleResponse(AuthResult authResult, AuthenticationRequestParameters authenticationRequestParameters, ILoggerAdapter logger, String errorMessage)
at Microsoft.Identity.Client.Platforms.Features.RuntimeBroker.RuntimeBroker.d__13.MoveNext()
at Microsoft.Identity.Client.Platforms.Features.RuntimeBroker.RuntimeBroker.d__12.MoveNext()
at Microsoft.Identity.Client.Internal.Broker.BrokerInteractiveRequestComponent.d__9.MoveNext()
at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.d__10.MoveNext()
at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.d__11.MoveNext()
at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.d__9.MoveNext()
at Microsoft.Identity.Client.Internal.Requests.RequestBase.<>c__DisplayClass11_1.<b__1>d.MoveNext()
at Microsoft.Identity.Client.Utils.StopwatchService.d__4.MoveNext()
at Microsoft.Identity.Client.Internal.Requests.RequestBase.d__11.MoveNext()
at Microsoft.Identity.Client.ApiConfig.Executors.PublicClientExecutor.d__2.MoveNext()
at bsone.uplift.Core.Services.AzureAuthService.d__17.MoveNext() in C:\Users\azureadmin\Source\Repos\bsone.uplift\App\bsone.uplift.core\Services\AzureAuthService.cs:line 155

AdditionalExceptionData:

Microsoft.Identity.Client.MsalClientException
HResult=0x80131500
Message=User canceled authentication.
Source=Microsoft.Identity.Client.Broker
StackTrace:
at Microsoft.Identity.Client.Platforms.Features.RuntimeBroker.WamAdapters.HandleResponse(AuthResult authResult, AuthenticationRequestParameters authenticationRequestParameters, ILoggerAdapter logger, String errorMessage)
at Microsoft.Identity.Client.Platforms.Features.RuntimeBroker.RuntimeBroker.d__13.MoveNext()
at Microsoft.Identity.Client.Platforms.Features.RuntimeBroker.RuntimeBroker.d__12.MoveNext()
at Microsoft.Identity.Client.Internal.Broker.BrokerInteractiveRequestComponent.d__9.MoveNext()
at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.d__10.MoveNext()
at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.d__11.MoveNext()
at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.d__9.MoveNext()
at Microsoft.Identity.Client.Internal.Requests.RequestBase.<>c__DisplayClass11_1.<b__1>d.MoveNext()
at Microsoft.Identity.Client.Utils.StopwatchService.d__4.MoveNext()
at Microsoft.Identity.Client.Internal.Requests.RequestBase.d__11.MoveNext()
at Microsoft.Identity.Client.ApiConfig.Executors.PublicClientExecutor.d__2.MoveNext()
at bsone.uplift.Core.Services.AzureAuthService.d__17.MoveNext() in C:\Users\azureadmin\Source\Repos\bsone.uplift\App\bsone.uplift.core\Services\AzureAuthService.cs:line 155

This exception was originally thrown at this call stack:
[External Code]
bsone.uplift.Core.Services.AzureAuthService.LoginAADInteractive(System.Collections.Generic.List) in AzureAuthService.cs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs attention Delete label after triage public-client untriaged Do not delete. Needed for Automation
Projects
None yet
Development

No branches or pull requests

3 participants