Changes a user’s password to a temporary, system-generated value.
Use resetPassword() to request that the API change the password of a User or SelfServiceUser, and return a system-generated password string of random letters and numbers. Use setPassword() instead if you want to set the password to a specific value.
Your client application must be logged in with sufficient access rights to change the password for the specified user. For more information, see Factors that Affect Data Access.
For information on IDs, see ID Field Type.
public String doResetPassword() { String result = ""; try { String userId = connection.getUserInfo().getUserId(); ResetPasswordResult rpr = connection.resetPassword(userId); result = rpr.getPassword(); System.out.println("User " + userId + " new password is " + result); } catch (ConnectionException ce) { ce.printStackTrace(); } return result; }
private void resetPassword() { //Invoke resetPassword call and save results in ResetPasswordResult ResetPasswordResult rpr = binding.resetPassword("userID"); // Get the generated password System.Diagnostics.Trace.WriteLine(rpr.password); }
| Name | Type | Description |
|---|---|---|
| userID | ID | ID of the User or SelfServiceUser whose password you want to reset. For information on IDs, see ID Field Type. |