You need to sign in to do that
Don't have an account?
pavan bommana 5
How to get the session of the org which is logged in another tab in same browser
I want the session id of the org which is logged on another tab through apex or visual force or lightning javascript
Hi Pavan,
find the below solution
https://salesforce.stackexchange.com/questions/110515/getting-session-id-in-lightning
if you find this helpful mark it as the best answer.
>> https://www.biswajeetsamal.com/blog/get-session-id-using-apex-in-salesforce/
You can try checking the above link that shows a way to get the sessionId in apex.
EDIT: $Api.Session_ID is to get session id in VF page
UserInfo.getSessionId() - it will work in apex but you cannot get the session id in debug log using it.
Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks.