Find your content:

Search form

You are here

Creating user via API


I am trying to build a app, and goal is to user light users ($10/100). I want to give a signup screen for new users. Regarding this I checked available API options

Problem with both the above calls is that, I don't see an option to set the password for the new user. My app will use behind the scenes, so sending salesforce password reset emails will not be acceptable at all.

On some research I found an option in SOAP API i.e. setPassword() call. Again problem is that during signup assuring success of both operations it tough i.e. - Create Call - Set Password call

Is their any direct API available which can be used to create users with desired username/password in or ?

Attribution to: Abhinav Gupta

Possible Suggestion/Solution #1

You can suppress creation of initial email (it's identical to unticking the checkbox "generate new password and notify user immediately" on the new user screen). Then whenever you're ready later - System.setPassword?

If this can work for you I'd like to link to my SO answer for similar thing:

The problem with setPassword is that it's good for one time (upon logging in you land on the password change page similar to what happens when your password expires). That's how SF makes sure sysadmin will not know the user's final desired password. And of course you'd have to set it to something that complies with your own policies ("remember 3 last passwords" for example).

Attribution to: eyescream
This content is remixed from stackoverflow or stackexchange. Please visit

My Block Status

My Block Content