<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
Redirecting User to Specific URL after SSO Authentication in Salesforce
Single Sign-On
Okta Classic Engine
Okta Identity Engine
Overview

This article provides a solution for redirecting a user to a specific URL within the Salesforce development environment after they have authenticated via Single Sign-On (SSO). It is a common use case when there is a need to link to a specific resource, such as a form, that requires prior authentication.

 

This information is relevant to administrators who have set up Single Sign On (SSO) for Salesforce in Okta and are looking to create links that authenticate and then redirect users to a specific location within the Salesforce development environment.

Applies To
Solution

A solution to this challenge is to create a Bookmark application in Okta that points to the Salesforce application, with a RelayState appended to it. The RelayState parameter is used to identify the specific resource the user will be redirected to after successful authentication. To accomplish this, utilize the Identity Provider (IdP) Login URL for the Salesforce App, with a RelayState pointing to the desired domain.
 

The following is an example of how the URL should be structured:

https://<tenant>.okta.com/app/salesforce/exk1fyxz6r3EW00Gr697/sso/saml?RelayState=https://<domain>.com
 

NOTE: The actual URL will vary based on the unique identifiers for the Salesforce application and the Okta tenant. The specific URL can be found within the Sign-On tab by viewing the SAML Setup Instructions.

 

Related References

Loading
Redirecting User to Specific URL after SSO Authentication in Salesforce