• Akshay Dixit
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi,

I have 2 users A and B. User A has Admin profile and so has the option to login as other users.

Now lets say, User A logged into the system and logged in as User B. 
Now, when I try to get the loggen in user Id using Userinfo.getUserId() or any other apex method, I get the User B record id. 

Is there a way, I can get the actual logged user i.e., User A record Id
Hi,

I have 2 users A and B. User A has Admin profile and so has the option to login as other users.

Now lets say, User A logged into the system and logged in as User B. 
Now, when I try to get the loggen in user Id using Userinfo.getUserId() or any other apex method, I get the User B record id. 

Is there a way, I can get the actual logged user i.e., User A record Id