Thank you for posting this in Microsoft Q&A.
Based on the information provided, I understand that the issue is that users are getting stuck in a login loop when they try to log in to the application using a different Azure Entra account. This happens because the initial login to Azure B2C was successful, and the user is not given the option to select a different account.
To allow the user to select a different Azure Entra account, you can add the prompt=login
claim, which forces the user to enter their credentials on that request, thereby negating single sign-on. Alternatively, using prompt=select_account
will display an account selector to the user, allowing them to pick which account they intend to sign in with, without requiring them to enter their credentials again. This will provide the option to select another user account.
When you want to sign the user out of the application, it is not enough to clear the application's cookies or end the session. You must redirect the user to Azure AD B2C to sign out. Otherwise, the user may be able to reauthenticate to your applications without entering their credentials again. Make sure to add a logout URL for your application.
For your reference: https://learn.microsoft.com/en-us/azure/active-directory-b2c/session-behavior?pivots=b2c-user-flow#sign-out
Hope this helps. Do let us know if you any further queries.
Thanks,
Navya.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.