简体   繁体   中英

Azure AD B2C integration with Azure AD enable to select profiles

I have Azure AD B2C where two identity providers Google and Azure AD. Also I have custom policy to login made by this manual. When I click on Google login button in my app, there is a choice of accounts, or I can select to login in new account. But when I select Azure AD provider, then I silently login into my app without any prompt. (The only way to change account is to clear cache of Chrome on my mobile device)

Is it possible to make in custom policy for login in Azure AD enable 'Login as other user' or not?

I faced the same issue and I fixed it by adding below code in Configure method for OpenIdConnectOptions

options.Events = new OpenIdConnectEvents
 {

    ...
    OnRedirectToIdentityProvider = async (context) =>
    {
      context.ProtocolMessage.Prompt = "select_account";
    }
 };

Can you share your Startup.cs file?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM