Get the current user Session Id

 How can we get current logged in user session Id in apex.

Answer

String MySessionID = UserInfo.getSessionID();
System.debug('MySessionID: '+MySessionID); 
Labels:
Join the conversation