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
Chuck Doran 6Chuck Doran 6 

URL to automatically login to Lightning

For years, I was using the following URL to have Lightning open when I opened a browser - https://login.salesforce.com/login.jsp?un=[ENTER_EMAIL_w/out_BRACKETS]&pw=[ENTER_PW_w/out_BRACKETS (https://login.salesforce.com/login.jsp?un=%5bENTER_EMAIL_w/out_BRACKETS%5d&pw=%5bENTER_PW_w/out_BRACKETS" style="color:blue; text-decoration:underline)]

This stopped working a few weeks ago. Is there an updated URL that will work with the current version of Lightning? Thanks.
David Zhu 🔥David Zhu 🔥
It is still working. You may need to clear your browser cache.
AnudeepAnudeep (Salesforce Developers) 

I tried https://login.salesforce.com/login.jsp?pw=PWD&un=UNAME and it is working fine. Can you remove parameters other than username and password and see if the URL is working fine?

When there are changes to the URL format it is usually documented

Can you try using an instance specific url instead? for example https://cs1.salesforce.com instead of https://login.salesforce.com
 

Chuck Doran 6Chuck Doran 6
I tried https://login.salesforce.com/login.jsp?pw=PWD&un=UNAME (with my credentials) as well as https://login.salesforce.com/login.jsp and both brought me to the login page which asked for my username and password. I tried clearing my cache too and it did not make a difference. Any other suggestions? Thanks.
David Zhu 🔥David Zhu 🔥
Mostly likely your user name or password is incorrect. Have you tried a different user name and password?
Chuck Doran 6Chuck Doran 6
Double-checked the username and password and they are both correct.
Chuck Doran 6Chuck Doran 6
I tried that. I also tried the URL in a different browser with no luck.
David Zhu 🔥David Zhu 🔥
It is weired. Can you check what it says in Salesforce login history? I think it has no login record at all. If that is the case, reboot your computer might help. I came across a couple of situations that I cannot even login.
AnudeepAnudeep (Salesforce Developers) 
Do you have My Domain enabled in your org? What happens when you use https://<lightning.domain.com> instead of https://login.salesforce.com

I used the domain URL and I got logged in and it took me to home page directly

https://anudeeplightning-dev-ed.lightning.force.com//login.jsp?pw=mypassword&un=myusername

With My Domain, you create a subdomain within the salesforce.com domain. For example, trailhead is a subdomain of the Salesforce domain: trailhead.salesforce.com. With a subdomain, you replace the instance URL that Salesforce assigned you, like https://na30.salesforce.com, with your chosen domain name, like https://somethingcool.my.salesforce.com.
Chuck Doran 6Chuck Doran 6
I tried the reboot and it did not make a difference. Is there something I should look for in the login history? Thanks.
Chuck Doran 6Chuck Doran 6
Yes, we have a custom domain and I’ve tried both – with our domain and with https://login.salesforce.com. Both lead to the standard login where I have to manually click the Login button. If you have any other suggestions, I’d welcome it. Thanks. Chuck.
Raveesh Raina 4Raveesh Raina 4
If you have special characters (such as the + synbol for Gmail aliases) in your username or password, you will have to encode them in the url. For example, if your username is chuck+customer@example.com, then the URL would look like:

https://www.salesforce.com/login.jsp?pw=SomePass&un=chuck%2Bcustomer@email.com

The following link (https://secure.n-able.com/webhelp/nc_9-1-0_so_en/content/sa_docs/api_level_integration/api_integration_urlencoding.html" target="_blank) has a list of some encodings
Julian LeahJulian Leah
I had no idea multiple users can log in. Multiple users can't even login at https://technicalustad.com/problems-do-first-year-students-have-in-college/ (http://I had no idea multiple users can log in. Multiple users can't even login at https://technicalustad.com/problems-do-first-year-students-have-in-college/. So all in all, I'm rather surprised it's the case here.). So all in all, I'm rather surprised it's the case here.