question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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 issue

Which 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:open
  • Created 4 months ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
aries-zhangcommented, May 15, 2023

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

1reaction
bgavrilMScommented, May 12, 2023

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prompt behavior with MSAL.js - Microsoft Entra
As a remedy, you can pass the prompt value none to an interactive request such as loginPopup . MSAL.js will then open a...
Read more >
Handle errors and exceptions in MSAL.NET
This article gives an overview of the different types of errors and recommendations for handling common sign-in errors.
Read more >
Add sign-out functionality to MSAL · Issue #589
What am I doing wrong (or NOT doing) that can force Azure to prompt for a password? (Once again: if I manually clear...
Read more >
Forcing reauthentication with Azure AD - Honza's Blarg
So when the user got forwarded to the authorization URL and prompted for their password, I removed the prompt=login from the URL, refreshed...
Read more >
azure ad b2c - User is not prompted for a password after ...
1 Answer. User is not prompted for a password after signing out from local B2C since the session cookie is still present. You...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found