I haven’t created a written post in quite a while, but as I was looking for resources on this topic, I realized there could be more out there.

This post is about customizing the login pages for Active Directory Federation Services or ADFS. We recently moved to Office 365 and instead of requiring our users to remember multiple passwords (one for their computer login and one for our Office 365 services) we set up ADFS. Some people would argue that we were too small of a company to really benefit from utilizing ADFS (we are about 35 people) but I disagree and so as a part of our Office 365 deployment, I also implemented ADFS and ADFS Proxy servers to handle authentication.

When editing the theme of the login pages as we are going to be doing, we will be doing it on our ADFS Proxy servers, not on our ADFS servers.
As anyone who’s dealt with ADFS knows, the login pages are very bland, similar to the one pictured below.
adfs

Now this is a very bland page, and (especially with the pretty 2013 Office 365 upgrade we just received) our users, including myself, were looking for something a little more flashy. Now, I only have very limited web development experience and none whatsoever with ASP, so I was digging around for some help and found very little, but I did find one page that helped me out quite a bit (link below). He has shown some more images of which pieces edit what.

http://cloudidentityblog.com/2012/09/18/custom-homerealmdiscovery-page-with-ad-fs-2-0/

If you’re looking to customize this page, all of the items that you will need to customize exist in the below listed files found in C:\intetpub\adfs\ls

web.config
logo.png
MasterPages\Masterpage.master
MasterPages\Stylesheet.css
App_GlobalResources\CommonResources.resx
App_GlobalResources\CommonResources.en.resx

If you’re familiar with Stylesheets at all, editing Stylesheet.css to adjust the colors should be a piece of cake for you. Otherwise, the CommonResources files have all of the text sections for all of the pages in them, so if you’d like to adjust any of the wording on the page, that would be done there. The Masterpage.master file is the page template for all of the pages, and adjusting it will adjust all of the pages associated with ADFS.

web.config
Changing this section of code:

To this:

Along with adding an image file of your logo with the name “logo.png” will add a logo to your page.

MasterPage.master
Changing these sections of code:

To a specific name of your choice:

As well as adding this to the Stylesheet.css file:

Will allow you to make edits that specifically adjust only the section that you want to edit. One that I made use of in a few places was the code:

To hide sections that I no longer wanted to show up.One other thing that I did in Stylesheet.css was adjusting this:

To this:

In order to hide the box border that they had assigned and push the text out to the edges.

I also edited CommonResources.en.resx to change this code:

To this code:

So that my users would stop getting confused about the format that they were supposed to enter their username in.

All in all I think it turned out very well (assuming the logo is not scribbled out) and did not take a whole lot of my time.
adfs2

0.00 avg. rating (0% score) - 0 votes