Setup: You have a SharePoint farm with an web application configured to use ADFS 2.0 for authentication via Trusted Identity Provider.
Problem: You want to add another web application to this SharePoint farm and configure the authentication via ADFS
Solution:
Open SharePoint PowerShell and issue the following commands:
$ap = Get-SPTrustedIdentityTokenIssuer $uri = new-object System.Uri("https://<appname>.domain.local") $ap.ProviderRealms.Add($uri, "urn:sharepoint:<appname>") $ap.Update()
where appname is the alias of your web application. Then add the Relying Party Trust in ADFS with this new realm->urn:sharepoint:appname.
We have ADFS 4.0, and I have done the above. However, when I login to the newly added web app it redirects to the default web app after successful login.