-
Notifications
You must be signed in to change notification settings - Fork 385
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Library version used
4.56.0
.NET version
.Net Framework 4.8.0
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
We have an app that can automatically sign the users in with their default Windows account. With MSAL .Net version 4.45.0 which we are currently using, the app is able to sign the users in without any account picker window popped up.
Since we have another issue with 4.45.0 which is it occasionally returns an expired token, we have been trying to upgrade it to the latest versions (4.56.0/4.57.0) for a fix.
However, in 4.56.0/4.57.0, we found that it pops up an account picker when the app attempts to sign in with user's default OS account.
Repro steps:
- Download the MSAL demo app from here: https://github.com/gladjohn/NetCoreWinFormsWAM_Maha
- Upgrade the MSAL .Net version to 4.56.0 or 4.57.0 (both reproducible)
- Run the app
- Use the following input, and click "ATI"
- Account picker pops up, as shown in the following screenshot
Relevant code snippets
PublicClientApplication creation:
PublicClientApplicationBuilder.Create(AppConfiguration.AzureActiveDirectoryClientId)
.WithAuthority(AppConfiguration.AzureActiveDirectoryAuthority)
.WithBroker(new BrokerOptions(BrokerOptions.OperatingSystems.Windows) { ListOperatingSystemAccounts=true })
.WithExperimentalFeatures()
.Build();ATI:
var account = PublicClientApplication.OperatingSystemAccount;
AcquireTokenInteractiveParameterBuilder tokenBuilder = Client.AcquireTokenInteractive(scopesToRequest)
.WithParentActivityOrWindow(Window.Handle)
.WithAccount(account)
.WithPrompt(Prompt.NoPrompt);
return tokenBuilder.ExecuteAsync();
### Expected behavior
When account and NoPrompt is specified, interactive login should not show the account picker pop up asking users to choose an account.
### Identity provider
Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)
### Regression
4.45.0
### Solution and workarounds
_No response_
