function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MarrisMarris 

Can I retrieve my password through Query?

Hi all,

 

Can I retrieve my password through SOQL query and where the password is stored in User object. Can anyone please provide me a solution.....

 

 

Thanks in Advance

 

Thanks

Marris

Shashikant SharmaShashikant Sharma

Hi Marris,

 

No you can not query your password from SOQL. There is no other way to do so.

 

 

MarrisMarris

Hi Sharma

 

Any other way possible. can we retrieve encrypted password through salesforce api calls or system methods

 

 

Thanks

Marris

 

 

RadnipRadnip

There is no way of getting the password as it would be insecure. You shouldn't need to access the password, what are you trying to achieve?

MarrisMarris

Hi dataville

 

I just want to do encryption of my username and password and send it through mail

 

 

Thanks

Marris

SuperfellSuperfell

You can not retreive the password, the setPassword & resetPassword API calls can be used to reset the password if its been lost etc.

MarrisMarris

Hi simonf

 

So I can't do encryption of my username and password. Isn't it

 

 

Thanks

Marris

SuperfellSuperfell

Only a hash of the password is stored, so you can't get back to the actual password.

RadnipRadnip
What are you trying to do with it in the email? What's the reason? To reset the password?
ashresthaashrestha

I have a similar requirement where I need to access the raw password (hashed) from salesforce. The reason behind this is we are trying to implement a single sign on with a centralized repository. We have mutlple systems are we are working on importing username and passwords from these to LDAP. From my research, we can implement delegated authentication but this would mean that the exisiting users credentials are still in salesforce and will not be available for for other systems to authenticate. So the big questions are 

1. Can we get an export of the raw password out of Salesforce to import it into LDAP

2. What kind of encryption method is Salesforce using for its Password? If LDAP does not support the hashing algorithm then there is going to be another problem. 

 

We can force the password reset but we would prefer the password to be intact for smooth transition as well has since the Users in salesforce are one of our important clients and would not want to loose them. 

 

Thanks.