Navigation

Tuesday, December 18, 2018

Login to Salesforce instance using SessionId


Login to Salesforce instance using SessionId
If you have session Id, then you can login to Salesforce directly using below URL hack :
https://[intance].salesforce.com/secur/frontdoor.jsp?sid=[sessionId]



on the above URL, you have to replace [instance] by actual salesforce instance name and [sessionId] by an actual sessionID of the user.
In the same way, we can directly login to portals or communities using below URL hack
https://[instance].salesforce.com/secur/frontdoor.jsp?sid=[sessionid]&orgId=[orgId]&portalId=[portalOrCommunityId]

Important Note: You have to be very careful while using/sharing SessionId, If it's publicly available then anyone can have access to your Salesforce Org.