Loading

Use of frontdoor.jsp to Log in to Salesforce

Date de publication: Nov 20, 2025
Description
Learn how to use frontdoor.jsp to give users access to Salesforce from a custom web interface, such as remote access Force.com site or other API integration, using their existing session ID and the server URL.
Résolution


Use frontdoor.jsp to give users access to Salesforce from a custom web interface, such as a remote access Force.com site or other API integration, using their existing session ID and the server URL. For Experience Cloud sites, use a web-scoped access token. Here's an example of what the URL would look like:

 

https://instance.salesforce.com/secur/frontdoor.jsp?sid=session_ID&retURL=optional_relative_url_to_open



Retrieve the session ID 

  1. The access_token from an OAuth authentication. Note that one of the scopes specified when you create a connected app must be web or full.
  2. The LoginResult returned from a SOAP API login() call.
  3. The Apex UserInfo.getSessionId().

The session ID returned using the Visualforce {!GETSESSIONID()} cannot be used on frontdoor.jsp.
Not all session types are supported with frontdoor.jsp, such as Experience Cloud site API sessions (security risk). For these sessions, consider using SAML for Single Sign-On instead.
 
We also have a new version of login using access token with frontdoor.jsp without the exposing the access token. More details can be found here.
Numéro d’article de la base de connaissances

000386254

 
Chargement
Salesforce Help | Article