When your domain is federated with Office 365, during your authentication session you are redirected to your ADFS servers to authenticate. You must then enter your Active Directory email address and password to access Office 365. If your company domain is long, such as education.fabrikam.com, I suggest you provide your users with auto-completion of your domain name. In order to do this, you need to modify your local ADFS Template.
For more information on how to customize your ADFS infrastructure, click on the link below:
1. First, create a new Template, by copying the default one. You will then make your modifications on this one, to avoid modifying the default Template of ADFS.
2. Then, export the Template to your location.
3. Look for the file onload.js in the folder C:\theme\script\ and add the following lines to the end of the document:
function runScript(e) {
if (e.keyCode == 13) {
AppendUPN();
return Login.submitLoginRequest();
}
}
var AppendUPN = function () {
var userName = document.getElementById(Login.userNameInput);
var lowerUserName = userName.value.toLowerCase();
//Check to see if they already included the UPN
var li = lowerUserName.lastIndexOf( @education.fabrikam.com’ );
if (li ==-1)
{
userName.value = userName.value + @education.fabrikam.com ;
}
return true;
}
document.getElementById(‘submitButton’).onclick = new Function(‘AppendUPN();return Login.submitLoginRequest();’);
document.getElementById(‘passwordInput’).onkeypress = runScript;
4. To replace the file we just modified in our custom theme, using Power Shell, run the command below:
5. Finally, to activate your new theme :