0

I have an existing SSO setup using ADFS as the identity provider. I wish to add a RelayState parameter to the end of the Login URL https://help.salesforce.com/articleView?id=000331033&type=1&mode=1. In the SSO setup in Salesforce, the Login URL cannot be edited through the UI although is present in the metadata XML if it is downloaded. I am a bit unclear from the documentation on how to do this, it seems to be me either

  1. This is something that has to be updated in ADFS
  2. I would have to re-create the SSO setting by uploading a new XML metadata file with the RelayState parameter specified.

1 Answer 1

0

RelayState should be added to the end of your IDP init URL (Identity Provider Login URL). This field is editable through UI

Example: https://identity.my.salesforce.com/idp/login?app=0spE00000008XXX&RelayState=/apex/test

enter image description here

RelayState is sent as an HTTP Parameter alongside a SAML AuthnRequest. See example request below

https://abc.my.salesforce.com/saml/authn-request.jsp?saml_request_id=_2CAAA...kCpi9ZA&saml_acs=https://abc.my.salesforce.com?so=00D60000000KY7C&saml_binding_type=HttpPost&Issuer=https://abc.my.salesforce.com&samlSsoConfig=0LE32000000KykE&RelayState=/setup/secur/RemoteAccessAuthorizationPage.apexp?display=touch&source=CAAAAVr..

This will ensure that the user gets redirected to the specific relay state after successful login

The example shown in the documentation takes the user to a VF page called test after successful login

1
  • Thanks for the response in our scenario we are using ADFS as our identity provider not a Salesforce IDP. We are also using service provider initiated login flow where the user access a Salesforce link after being authenticated to ADFS and Salesforce makes the request to the ADFS IDP to authenticate. Would your solution still work in that scenario?
    – scottrm
    Commented Jun 26, 2020 at 16:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .