I'm very new to the Azure AD world for Authentication and Authorization.
I'm writing some POC code for authentication of an internal web app. Users of the web app are sharing the machine, and the AD account logged into windows is a "machine" account.
The current "authentication" process allows users to scan a barcode on the back of their ID badge and a DB lookup is done for the "credentials".
I would like to keep some of this integration but also use Windows Identity Platform (formerly Azure AD for developers).
I'm looking for a way to have the user prompted to scan their badge before operating on the app and if the badge scanned isn't the badge held by the currently logged in user, prompt for a "switch account" experience. From there a user can select their own account if they are already signed in, or sign in if their account isn't shown in the list.
How do I prompt this "switch accounts" experience?
(similar to what we see in the "change directory" menu of Azure Protal)

(or the "pick an account" prompt when signing in)

Just add prompt=select_account to the auth request url, then the user is prompted to select an 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.
Reference:
https://learn.microsoft.com/en-us/azure/active-directory/develop/v1-protocols-oauth-code#request-an-authorization-code
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With