For AD FS 4.0, you need to enable the AD FS properties
EnableIdPInitiatedSignonPage and
EnableRelayStateForIdpInitiatedSignOn by running the
following commands in
PowerShell:
Set-AdfsProperties -EnableIdPInitiatedSignonPage:$true
Set-AdfsProperties -EnableRelayStateForIdpInitiatedSignOn:$true