0

is it possible to create a community usser via Apex without password and log him after in the community.

The perfect context would be the user fill a form (public access page) to create his account, he doesn't put his password, his community user is created via Apex, he is loged via Apex as well and he is redirected to the next page (login access page).

Is it possible to do something like that or the password is required?

I thonk not but I would like to be sure.

Thanks

1
  • 1
    you can create users but it is not clear what you mean by "he is loged via Apex as well"
    – Patlatus
    Commented Mar 1, 2019 at 15:35

1 Answer 1

2

Yes, with the new External Identity feature, you can allow login with an email address + verification code or a mobile phone number + verification code, so that a password is no longer needed.

From the Discoverable Login Page section of the document:

If you want users to log in with another identifier than their username, such as a phone number or email address, use the Login Discovery Page. After the user enters the identifier, the process sends a verification code to the user’s email address or mobile device. If the user enters the code on the generated Verify page correctly, the user is logged in to your community. Login Discovery supports identity verification via email address and phone number. You can support custom identifiers, such as an employee number or federation ID, in Apex.

Note that if you want to use the moble phone + verification code process, you must also purchase an add-on license to cover all the SMS messaging that Salesforce will do. This is the Identity Verification Message Credit.

Salesforce has a new usage-based entitlement license that tracks SMS messaging for identity verification. This add-on license is available with all external user licenses. It enables Communities and External Identity customers to send text messages to their users for identity verification purposes.

Who: You purchase a license for Identity Verification Credits, which allows your org a predetermined number of SMS messages for identity verification. For exact limits, contact your Salesforce account rep.

4
  • 1
    Hi @David, I think it is worth mentioning that even with External Identity login process you still must set a password upon first login. Only then can you log in using verification code, what is silly as you set a password you will never use again. Commented Jun 10, 2022 at 11:33
  • @naveen.singh that's interesting, is that mentioned in the documentation anywhere? Commented Jun 10, 2022 at 19:01
  • nope, it isn't, what makes it even more annoying. It is possible to bypass it tho, by overriding standard change password page with custom one, invoke System.setPassword and redirect back to login page Commented Jun 13, 2022 at 6:44
  • @naveen.singh You can create the user without a password, we do this all the time for customers. How the UI treats such a user is a different question. Feel free to post a new Q&A around this topic.
    – identigral
    Commented Oct 6, 2023 at 17:26

You must log in to answer this question.

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