0

In release document of version 40, a new call changeOwnPassword() has been added in partner wsdl to change the own password. It says The call setPassword() can no longer be used to allow users to change their own passwords. Use changeOwnPassword() instead. What exactly the above operation does?. When to use changeOwnPassword and setPassword ? I can able to change the password for own my account using both the calls, in setPassword call need to provide userID and new password and in changeOwnPassword need to provide old password and new password.

Why we can't use setPassword to change their own password?

Please can some one suggest me?

1 Answer 1

2

changeOwnPassword is supposed to emulate the Setup > My Personal Information > Change My Password feature, while setPassword is meant to be a feature that allows an administrator to change any user's password.

Prior to version 40.0, both the non-administrative "change password for self" and the administrative "change password for any user" method was the same method. So, an integration using version 39.0 or lower would call setPassword to set the password for either the current user or any other user. An exception is thrown if the the user is not an administrator but attempts to change another user's password.

Starting with version 40.0, a non-administrator user will automatically get an error if they call setPassword at all, and must instead use changeOwnPassword. While the wording may be a bit ambiguous, the change is meant to separate the non-administrative feature from the administrative feature. To see how this works in principle, create a new, non-admin user (such as a Standard User), and try calling both methods to observe the difference in functionality.

0

You must log in to answer this question.

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