Quantcast
Viewing all articles
Browse latest Browse all 35736

Default login domain for the ADFS 3.0 change password page

You might have seen that it is possible to customize the ADFS form-based authentication page to programmatically add the domain name when the user provides a sam-account name without the domain. To achieve the same result on the ADFS 3.0 change password page I put together the following JavaScript code that will need to be added to the onload.js that is provided by ADFS:

var oldVersionOfFunc = UpdatePassword.submitPasswordChange;

UpdatePassword.submitPasswordChange = function() {

  var userName = document.getElementById("userNameInput");

  if (userName.value && !userName.value.match('[@\\]'))
  {
    var userNameValue = 'MyNetbiosDomainName\' + userName.value;
    document.forms['updatePasswordForm'].UserName.value = userNameValue;
  }

  return oldVersionOfFunc.apply(oldVersionOfFunc, args);
}

Where MyNetbiosDomainName is the NetBIOS domain name for your domain.


Viewing all articles
Browse latest Browse all 35736

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>