Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 227
highfive_ Avatar asked Oct 18 '25 11:10

highfive_


1 Answers

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

like image 197
Hong Ooi Avatar answered Oct 21 '25 06:10

Hong Ooi