MSAL does not pass the prompt to WAM (was: WAM signout with RemoveAsync and signin with WithPrompt(Prompt.ForceLogin) does not ask password)
See original GitHub issueWhich version of MSAL.NET are you using? MSAL.NET 4.53.0
Platform .NET 4.8 (Winforms)
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? This is a new app
//signout:
var accounts = await MyAuthentication.Pca.GetAccountsAsync();
if (accounts.Any())
{
await MyAuthentication.Pca.RemoveAsync(accounts.FirstOrDefault());
Logger.LogDebug($"User: {accounts.FirstOrDefault().Username} signed out!");
}
//signin:
authResult = await Pca.AcquireTokenInteractive(scopes).WithPrompt(Prompt.ForceLogin)
.ExecuteAsync()
.ConfigureAwait(false);
Expected behavior I expected, that user is signed out and after requesting new token with AcquireTokenInteractive, the pop-up windows opens, where user can be chosen. After user (e-mail) is chosen, the user should again enter password.
Actual behavior I expected, that user is signed out and after requesting new token with AcquireTokenInteractive, the pop-up windows opens, where user can be chosen. After user (e-mail) is chosen, the user is signed in without entering a password. Also after manual deleting cache file, user is automatically logged in. This behavior is the same for two different logins, on same desktop pc, where the password was entered only one time.
Issue Analytics
- State:
- Created 4 months ago
- Comments:12 (5 by maintainers)
Top GitHub Comments
Sorry for the delay in raising a bug about the prompt to WAM. It seems this issue is now tracking it, so attaching the convo here: https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/4110#issuecomment-1530955885
Possibly. Today, MSAL does not pass on the Prompt option to WAM. That’s a bug. We can get that fixed but I don’t know what WAM behavior will be like.
WAM not displaying the 3 dots will not be easy to change.