Reset password for a User via ForceClient
I'm trying to use the following method for resetting a password for a User: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_user_password.htm
I'm failing to see how can I call that API route and get the new password response with this toolkit, as JsonHttpClient's DeleteAsync methods return bool, overriding the BaseClient's DeleteAsync which returns string.
I have thought of several alternatives, but I'm not sure which one, if any, would be accepted as a pull request. Please let me know if there's a way I missed to call and get the response for resetting a password, or which approach would be considered okay.
Hi @koide, any progress on this issue? I'm trying to set / reset password but cannot find a way to do this
I did it outside the library with direct requests to the API, @leobel, see https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_user_password.htm
I reused the Authentication client from the library to get the AccessToken, ApiVersion and InstanceUrl. Then I just did a DELETE request to $"{_auth.InstanceUrl}/services/data/{_auth.ApiVersion}/sobjects/User/{id}/password" with a regular HTTP library, adding the Authorization header with the Token. {id} is the Salesforce Id of the user you want to reset the password to.