You need to sign in to do that
Don't have an account?
Unable to use Frontdoor.jsp to Log Into Salesforce
Hello,
I am using Frontdoor.jsp to Log Into Salesforce from one of the the Salesforce Organization(Source) to another Salesforce Organization (Target).
I have created one Connected App in Target Org with web scope.

As per the documentation, we can use access_token from an OAuth authentication instead of Session ID.
https://help.salesforce.com/HTViewHelpDoc?id=security_frontdoorjsp.htm&language=en_US
I am unable to redirect to Target Organization with access_token from an OAuth instead of session ID.
targetURL: https://instance.salesforce.com/secur/frontdoor.jsp?sid=access_token&retURL=optional_relative_url_to_open
Thanks!!!
I am using Frontdoor.jsp to Log Into Salesforce from one of the the Salesforce Organization(Source) to another Salesforce Organization (Target).
I have created one Connected App in Target Org with web scope.
As per the documentation, we can use access_token from an OAuth authentication instead of Session ID.
https://help.salesforce.com/HTViewHelpDoc?id=security_frontdoorjsp.htm&language=en_US
I am unable to redirect to Target Organization with access_token from an OAuth instead of session ID.
targetURL: https://instance.salesforce.com/secur/frontdoor.jsp?sid=access_token&retURL=optional_relative_url_to_open
Thanks!!!
E.g. https://na5.salesforce.com/secur/frontdoor.jsp?sid=access_token&retURL=optional_relative_url_to_open
Does the complete target URL with the correct domain and sid work if you use it outside of the connected app?
Are you getting any specific error messages?
1. I have added the domain in the targetURL to match the Target Org.
E.g. https://amar-trailhead-dev-ed.my.salesforce.com/secur/frontdoor.jsp?sid=00D90000000xuMs!AQkAQOzOs6EodDkB7ufAv1qyemOqFoYXwpYacX6j1aKu0x5wf_JrIuaBRU1iyxU8ZLip9EgN1tE.AFJY_hqvo6s6nvk1cxOo&retURL=/06690000005ti4I
2. Yes, the complete target URL with the correct domain and sid works if I use Session ID (fetched from Developer Console -
UserInfo.getSessionId(); ) instead of access_token
3. I am not getting any specific error message,the redirected Page is asking for Username and Password instead of logging me in and even though I provide the correct credentials its asking for the credentials again.
can someone from Salesforce comment on this?
Then I went to My Profile and updated some settings and my profile picture. It was done successfully bu when I tried to View, it suddenly redirected me to somewhere, and their I got this problem - This Site Can't Be Reached - https://<mydomain>-dev-ed.my.salesforce.com's server DNS address could not be found.
When I tried to login salesforce redirected me to following URL:
https://mydomain-dev-ed.my.salesforce.com/secur/frontdoor.jsp?sid=00D9000000105NT%21AQ0AQIlWEAe0EQQbGanhH3VA77ij41P1wHBSKELP3VrQnPS5eIGt5jN8vconV05Jz5cXMieJgUFdi7.Y_9_8VNTDRxmdYFsk&apv=1&allp=1&cshc=0000003c7Rf000000105NT&display=page
And showed same error - DNS address could not be found.
My solution was - I removed all other query params except "sid" (Its access token)
My URL became:
https://mydomain-dev-ed.my.salesforce.com/secur/frontdoor.jsp?sid=00D9000000105NT%21AQ0AQIlWEAe0EQQbGanhH3VA77ij41P1wHBSKELP3VrQnPS5eIGt5jN8vconV05Jz5cXMieJgUFdi7.Y_9_8VNTDRxmdYFsk
I dont know how it worked, But my logic was simple.
1 - After login - frontdoor.jsp - It was may be trying to redirect to my old page.
2 - Somehow due to some bug from Salesforce, that page was inaccessible and it was giving that DNS error.
3 - I just thought, let the page just login and not to redirect to somewhere with some other query params trying to set some enviornment settings etc.
4 - And then with above stripped URL, I was able to login successfully to my dev org.
Thats it - Hope anyone finds it similar and helpful.
Thanks !
I have the same issue and spent two days trying to figure out the issue. I solved changing the login from REST API to SOAP API and it worked fine.
Soap API XML Example
URL: https://login.salesforce.com/services/Soap/c/24.0/Also, in the Header of SOAP I have added Content-Type = text/xml and SOAPAction = login