function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Adrian-EAdrian-E 

Passing Landing Page and Login through URL

Hi,

I need to log users into Salesforce and immediately return the following URL as the first page:
https://ssl.salesforce.com/500/e?isdtp=mn

How can I construct a URL that passes both the username, password and immediately logs the agent into the above URL without any additional clicks?
Best Answer chosen by Admin (Salesforce Developers) 
Paul.FoxPaul.Fox
Try using %26 instead of the & symbol when you want to pass additional fields. Right now it is ending the starturl with the & since it thinks that's a different field.

All Answers

Paul.FoxPaul.Fox
Try this:

https://ssl.salesforce.com/servlet/servlet.DesktopLoginPage?un=user%40domain.com&pw=theirpassword&startURL=%2F500%2Fe%3Fisdtp%3Dmn&isdtp=mn

Typically you'd go to login.salesforce.com but that url you have directs to the desktop login page so I'd try that first.
The %40 in the un= is the @ symbol formatted for URL. The startURL has also been formatted so it can be passed as a variable.

-Paul


Adrian-EAdrian-E

Thanks a million Paul! worked like a charm...

Any chance you would know how to pass other variables through such as cas3 and other CASE fields?

  1. This doesnt seem to be working:

https://login.salesforce.com/?un=USERNAME&pw=PASSWORD&startURL=%2F500%2Fe%3Fisdtp%3Dmn&cas3=John%20Doe

Paul.FoxPaul.Fox
Try using %26 instead of the & symbol when you want to pass additional fields. Right now it is ending the starturl with the & since it thinks that's a different field.
This was selected as the best answer
Adrian-EAdrian-E
Thanks! You are a lifesaver!
BrentaaaaaaaaaaBrentaaaaaaaaaa
This is not working for me, it just takes me to a blank page.
Paul.FoxPaul.Fox
Most other salesforce users will have to construct a much different URL.

https://login.salesforce.com?un=user%40domain.com&pw=theirpassword&startURL={wherever you want to start}
In the start url, make sure to replace any forward slashes with %2F and any other special characters with their hex equivalents.
You can use this chart for converting characters http://www.asciitable.com/ just put a % sign in front of the hex value you see in the chart.