Is there a way to get the details/credentials (email, password, name, etc.) of the logged in user using salesforce SDK or even third party libraries?. After allot of googling and searching, i found this link but doesn't work on me:


1 Answer 1


You have the current user ID from the userId property on SFOAuthCredentials after authentication succeeds. Then you can just issue a SOQL query for the User object to fetch any fields you like, including email, name, profile, etc. You certainly cannot fetch the user's password in that way, nor should you be able to -- that's the entire point of OAuth.

  • In fact, OAuth is specifically designed to exposing exposing passwords outside the authentication system.
    – sfdcfox
    Dec 4, 2014 at 17:37
  • Is there a way to do this by querying the API without issuing a network call? Jul 18, 2016 at 19:19
  • Sorry, what? If you're talking to a remote API, you are necessarily making a network call. Jul 19, 2016 at 20:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .