Umbrella Corporation Theme for ADFS


So I got bored the other day, and decided it was high time my ADFS server had something more inventive than the out-the-box look.

Fair use disclaimer: in case it’s not obvious, Umbrella Corp is a made-up company from the Resident Evil universe and isn't public IP. I’m using it because I love a good Sci-Fi flick and it’s as good a fake corporate entity as any to borrow for a test-lab. Fair use and all that – the point of this is to show how to theme ADFS, and to share my hacky theme (download files below too).

After some hacking around I ended up with this theme below:

This is what happens when you’re bored in a hotel somewhere.

How Does Theming Work in ADFS?

Given ADFS isn’t exactly an normal app in IIS, theming ADFS is a bit trickier than normal. What you can include in a theme is tightly controlled so as to not compromise security of what’s actually quite a serious role for ADFS server – being a security gateway into all the things.

So if you want to customise how ADFS looks, first of all you have to create an ADFS “theme” to package up your customisations. A theme consists of the following elements:

  1. Logo (image).
  2. Illustration (image).
  3. Stylesheet (CSS).
  4. Runtime stylesheet (CSS).
  5. JavaScript to run “on load”.
  6. Additional file resources.

Each element can have a specific locale too if you want; i.e. a stylesheet for Spanish, another for English. You put together a theme with those elements (you can export an existing theme to base new themes on), then make the theme active and that’s it. All in PowerShell.

So as my theme is a bit craptastic, I did it by just adding a couple of hand-hacked images I borrowed + a custom stylesheet with the references in this script:

New-AdfsWebTheme -Name "umbrella-theme" -SourceName default

Set-AdfsWebTheme -TargetName "umbrella-theme" -AdditionalFileResource  @{Uri="/adfs/portal/images/caution.PNG";Path="S:\Umbrella-ADFS-theme\images\caution.PNG"}

Set-AdfsWebTheme -TargetName "umbrella-theme" -AdditionalFileResource  @{Uri="/adfs/portal/images/UmbrellaBack.jpg";Path="S:\Umbrella-ADFS-theme\images\UmbrellaBack.jpg"}

Set-AdfsWebTheme -TargetName "umbrella-theme" -StyleSheet @{Locale="";path="S:\Umbrella-ADFS-theme\css\style.css"}

Set-AdfsWebConfig -ActiveThemeName "umbrella-theme"

That’s it. Files available here.

Comments (0)

Skip to main content