highfive_
highfive_

Reputation: 77

How to force Azure account picker

I've implemented Azure AD authentication with no problem, however we also need to always show the account picker whenever the user has more than one account (basically show even if there's only one account available)

What we need is exactly what this post has described (Force google account chooser) but with Azure AD.

You guys know if there's possible? Couldn't fine anything related to that in the Azure Doc

Upvotes: 4

Views: 3461

Answers (1)

Hong Ooi
Hong Ooi

Reputation: 57686

You didn't specify which SDK (if any) you're using, but at a low level, you include &prompt=select_account as a query parameter in the request to the authorization endpoint. This is documented here: https://learn.microsoft.com/en-au/azure/active-directory/develop/v1-protocols-oauth-code

prompt

Indicate the type of user interaction that is required. Valid values are:
login: The user should be prompted to reauthenticate.
select_account: The user is prompted to select an account, interrupting single sign on. The user may select an existing signed-in account, enter their credentials for a remembered account, or choose to use a different account altogether.
consent: User consent has been granted, but needs to be updated. The user should be prompted to consent.
admin_consent: An administrator should be prompted to consent on behalf of all users in their organization

Upvotes: 6

Related Questions