How to Customize AD FS Error Messages
Entering a username incorrectly in AD FS results in a reasonably useful error message. However, some folks desire to change this, which is perfectly OK too.
Poking through the HTML behind
LoginErrors later on. The page will then utilise that in the event of either condition (username format error or empty password) being met. Be sure to follow the approach below that matches your environment:
Default AD FS theme (Create custom theme)
If you don’t already have a custom AD FS theme, why not? They’re a great way to customise the (somewhat bland) default AD FS interface. Let’s create one now! You can use this to apply the customisations here, as well as to update countless other display and functionality features of the AD FS interface.
Once you’ve created your custom theme, follow the steps below.
Existing custom AD FS theme
If you already have a custom AD FS theme, you’ll want to perform the following steps:
- Download your custom theme (herein ‘customtheme’) to your local machine
- Add the following code to the bottom of the onload.js file, modifying error messages as appropriate:
- Upload the customised onload.js file to your custom theme:
- Apply the custom theme: