I am trying to build a database.com app, and goal is to user Database.com light users ($10/100). I want to give a signup screen for new users. Regarding this I checked available API options
- SOAP API create() call
- REST API, POST user data to the sobject user endpoint
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 database.com 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 force.com or database.com ?
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: https://stackoverflow.com/questions/13118039/salesforce-creating-contact-and-user-by-importing-csv-file-send-notification/13137400
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 https://salesforce.stackexchange.com/questions/4037