Unable to change accounts when using OpenID Connect pointing to an AAD tenant
See original GitHub issueLibrary
-
msal@1.x.xor@azure/msal@1.x.x -
@azure/msal-browser@2.x.x -
@azure/msal-angular@0.x.x -
@azure/msal-angular@1.x.x -
@azure/msal-angularjs@1.x.x
Description
Azure AD B2C is configured to use Local Accounts and OpenID Connect, which points to an Azure Active Directory tenant.
When an user from the AAD logs in via the button configured in B2C, usually he/she is also logged in another “application”, lets say Outlook or Office or Sharepoint etc from the original tenant.
The logOut() feature on MSAL for Angular (not AngularJS) seems to just remove session data for the application that uses B2C, which seems far at first, but here comes the problem.
User gets logged out from the application that uses ADD B2C, so now the user can login into the application with another user, but in my scenario the user wants to login with a different user that exists in the AAD tenant (via the button, configured with OpenID Connect)… since the session/cookies data from the original tenant was not removed, when hitting the button to try a different user, the user gets logged in again with the same user automatically.
The only way to do login with a different user is, lets say, open Office.com do a signout and now try again in the application that uses B2C, because now a login page from the original tenant will appear, allowing the user to choose any user.
Please, any advice? Is there a way to do a “hard logout” coming from the application? Is there any configuration that forces the login page from the AAD to always appear when hitting the OpenID Connect button?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (5 by maintainers)

Top Related StackOverflow Question
@cleberdantas Yes, you can provide the prompt parameter in MSAL Angular 0.x via
extraQueryParameters:extraQueryParameters: 'prompt=select_account',closing since this has not had activity