Customizing the ADFS forms based login page

By default the login page for the ADFS is very ugly, so this post will talk about how to customize it. This post will be divided into ADFS 2.0 and ADFS 3.0

Customize login page for ADFS 2.0

First of all, we have to do this modifications in the ADFS Proxy Server, so let’s begin:

Adding a Logo
Logo image file should be 600×100
Save image file to c:inetpubadfslslogo.jpg (or logo.png)
Open c:inetpubadfslsweb.config in notepad
Locate text
<!–
<add key=”logo” value=”logo.jpg” />
–>
Remove the “<!–” and “–>” to uncomment the section. Change filename to match the logo you saved.
Save file and close

Change the “Example” Instructions

  • Go to C:inetpubadfslsApp_GlobalResources
  • Edit file CommonResources.en.resx in Notepad (replace the “en” with your localization code if not English)
  • Locate text:
    <data name=”UsernameExample” xml:space=”preserve”>
    <value>Example: DomainUsername</value>
    </data>
  • Edit this text to be what you want
  • Save File and close

Change the Instruction Text

  • Edit CommonResources.en.resx in Notepad as per item above
  • Locate text:

    <data name=”FormsSignInHeader” xml:space=”preserve”>

    <value>Type your user name and password.</value>

    </data>

  • Edit this text to be what you want
  • Save file and close

Change the Page Title

  • Go to C:inetpubadfslsApp_GlobalResources
  • Edit file CommonResources.en.resx in Notepad
  • Locate text:
    <data name=”FormsSignInPageTitle” xml:space=”preserve”>
    <value>Sign In</value>
    </data>
  • Edit this text to be what you want
  • Save File and close

Remove or Change the Hostname Header Above the Login Box

  • Go to C:inetpubadfslsMasterPages
  • Edit MasterPage.master.cs in Notepad
  • Locate text:
    {
    PageTitleLabel.Text = Page.Title;
    STSLabel.Text = FriendlyName;
    }
  • Change this text to what you want. Your text MUST BE IN QUOTES. Like this
    STSLabel.Text = “Contoso Limited Single Sign On”;
  • Save File and close

More information: Here

Customize login page for ADFS 3.0

To make this changes is pretty easy, and we will done them by Powershell!!

So, we need to enter into ADFS and open a Powershell CMD as Administrator, and type the following:

&nbsp;
Import-Module ADFS
#This simply adds the ADFS commands to PowerShell. It’s necessary so the rest can run.&lt;/
SetAdfsGlobalWebContent CompanyName "Your company name
#This sets the name that is listed above the logon form
Set-AdfsWebTheme -TargetName default -Logo @{path=”c:Contosologo.png”}
#To set a logo
Set-AdfsWebTheme -TargetName default -Illustration @{path="c:background.png"}
#This sets the “illustration” – the image to the right of the sign-in form. Just change the path from “c:background.png” to the path to your image. Microsoft recommends the dimensions for the illustration to be 1420×1080 pixels @ 96 DPI with a file size of no greater than 200 KB
Set-AdfsGlobalWebContent -SignInPageDescriptionText "&lt;P&gt;&lt;B&gt;Sign-in requires format yourdomainusername.&lt;/B&gt;&lt;/P&gt;" 
#This inserts the text right below the sign-in screen – it uses basic HTML for formatting. Simply type whatever text you want between the quotation marks.

And that’s it! Just a few simple changes and you have your custom ADFS 3.0 logon page! If you want other ways to change this, visit https://technet.microsoft.com/en-us/library/dn280950.aspx

Cheers!

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s