Setting ADFS Theme for Application Groups via Powershell?

40 views Asked by At

Currently, we have plenty of WS-FED and SAML applications managed by ADFS 4.0 (ADFS 2016). For a some of the relying parties (service providers) we've set Custom Web Themes with Set-AdfsRelyingPartyWebTheme as discribed here: https://learn.microsoft.com/en-us/powershell/module/adfs/set-adfsrelyingpartywebtheme?view=windowsserver2016-ps

For example:

$RelyingPartyName = "MyRpName"
$WebThemeName = "MyCustomLoginTheme"
Set-AdfsRelyingPartyWebTheme -TargetRelyingPartyName $RelyingPartyName -SourceWebThemeName $WebThemeName

This is working without any problem.

We recently started to add OAuth applications (WebApiApplication with a NativeClientApplication) with ADFS using the Application Groups functionality.

The login process is working without any problem.

What I am missing or could not find in the documentation is a powershell command such as

Set-AdfsNativeClientApplicationWebTheme or at least Set-AdfsApplicationGroupWebTheme

I've also checked alternatives. Neither Set-AdfsNativeClientApplication nor Set-AdfsApplicationGroup support a SourceWebThemeName parameter.

Any ideas?

1

There are 1 answers

0
FuMe On

You can use the same exact cmdlet to apply a webtheme to an app inside an application group, just use the application display name (not the identifier) as the -TargetRelyingPartyName parameter. Just be careful that in some cases you have to apply the custom webtheme to the web application or the webapi. It depends on how the authentication is triggered, generally speaking you have to assign the webtheme to the "resource" specified in the authorization request.