How to clear login_hint (user_hint)?

MolokoVelocette 21 Reputation points
2020-04-09T11:51:12.797+00:00

We have an application that performs HRD based on the users e-mail address that they enter.

Then (in some cases) it either redirects the user to ADFS WAP for authentication or another IdP.

The redirect includes the e-mail address entered by the user as login_hint/user_hint to ADFS which then automatically populates the user name field with the e-mail address.

Unfortunately this e-mail address cannot be used to authenticate using our ADFS so users are forced to clear the user name field and type in the correct user name.

Since this is very unintuitive many users dont understand they need to do this and this results in failed authentication.

Is there a way to clear the user name field from the login_hint/user_hint?

I am guessing using onload.js to NULL the value of the login_hint or username parameter would be the way to do it but how exactly?

Active Directory Federation Services
Active Directory Federation Services
An Active Directory technology that provides single-sign-on functionality by securely sharing digital identity and entitlement rights across security and enterprise boundaries.
1,198 questions
0 comments No comments
{count} votes

Accepted answer
  1. Pierre Audonnet - MSFT 10,166 Reputation points Microsoft Employee
    2020-04-12T14:59:04.22+00:00

    Hi -

    I guess you could do something around those lines (not tested):

    var userNameInput = document.getElementById('userNameInput');    
    if (userNameInput)    
    {    
           // Set the username field to blank    
           userNameInput.value = '';    
    }    
    

    But you could also use that email address as a alternate logon for the users (as long as we are not talking about Azure AD integration, else there are some caveats), as long as the email address exist in AD (and it could be stored in a customer/different attribute than the actual email address if the "real" one is different), you could use the following: https://learn.microsoft.com/en-us/windows-server/identity/ad-fs/operations/configuring-alternate-login-id.


0 additional answers

Sort by: Most helpful