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:



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 '14 at 17:37
  • Is there a way to do this by querying the API without issuing a network call? – Brad Thomas Jul 18 '16 at 19:19
  • Sorry, what? If you're talking to a remote API, you are necessarily making a network call. – Jonathan Hersh Jul 19 '16 at 20:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.