How to login into salesforce using session id?

We can login into salesforce without using the salesforce username & Password

Step 1 : Go to Developer Console

Step 2 : Execute this below apex code


				
					String baseUrl = URL.getCurrentRequestUrl().toExternalForm().substringBefore ('/services/');
String sessionID = UserInfo.getOrganizationId()+''+UserInfo.getSessionId().subString(15);
system.debug(baseUrl+'/secur/frontdoor.jsp?sid='+sessionID);
				
			

In Debug Log you will get full URL now using URL you can login into your org 

Leave a Comment