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.

Unable to change accounts when using OpenID Connect pointing to an AAD tenant

See original GitHub issue

Library

  • msal@1.x.x or @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:closed
  • Created 4 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jasonnuttercommented, Mar 6, 2020

@cleberdantas Yes, you can provide the prompt parameter in MSAL Angular 0.x via extraQueryParameters: extraQueryParameters: 'prompt=select_account',

0reactions
DarylThayilcommented, Mar 25, 2020

closing since this has not had activity

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure an OpenID Connect OAuth application from Azure ...
These applications allow sign-in by user accounts from an Azure AD tenant, different from the one where the application is registered. They ...
Read more >
Making Azure AD OIDC Compliant - Abhinav Sonkar
Making Azure AD OIDC Compliant. So you thought using Azure Active Directory for OpenID Connect authentication would be easy? Think again.
Read more >
Azure AD OpenID Connect - FusionAuth
Login using Azure AD as an OpenID Connect Identity Provider. ... note the Application (client) ID and the Directory (tenant) ID .
Read more >
AzureAD as an OpenID Connect (OIDC) and OAuth provider
1. Create an OIDC client (application) with AzureAD. ... Please find below a set by step Quovadis-Web application registration screenshots. a.
Read more >
Linking External Identity Users With Existing Users
I can't really find any documents on how to handle linking Azure AD users with the existing accounts in my IDP. I've seen...
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