0

I'm getting the error below when creating external users (Site.createExternalUser) only when encryption is on and when adding new contacts after turning on the encryption to default fields.

We encountered an unknown error while processing this request

So it works for 2 out of 3 different scenarios, before starting I'd like to share some background about the environment and settings:

  • The community is published
  • The Account Owner does not have a User Role assigned
  • The site guest user does have Create and Read permissions on the Account and Contact objects
  • Self-registration is enabled for the community.

Scenario 1: Nothing is encrypted. It works!

Scenario 2: Create a contact, configure the email and then encrypt the default Salesforce fields (including email). It works! The external user is create without any issue!

Scenario 3: Everything is already encrypted, then after creating a new contact and waiting it to became available via SOSL (same as scenario 2) the process to self-register tries to create the external user. This is when we get the error "We encountered an unknown error while processing this request".

Note that if you disable encryption and enable it again, it works. However this workaround is unacceptable.

Steps

  1. Locate an existing contact by the email (encrypted/not encrypted depending on each scenario)
  2. Create a new user with same email
  3. Create external user

Finally, the question! Why scenario 2 and scenario 3 are not behaving exactly in the same manner? Why it works after decrypting/encrypting?

Note: Salesforce Case has been raised

  • Is this using Shield Platform encryption? – Dave Humm Feb 26 at 14:50
  • @DaveHumm, yes it's using Shield Platform encryption. – Pablo Fischer Feb 27 at 15:00
  • After waiting a few weeks, Salesforce has recognized it as a Known issue. Unfortunately the solution is to deactivate encryption of Contact's Name and Email. Here is the link to Salesforce Known issue: success.salesforce.com/issues_view?id=a1p3A000001FT6FQAW If it affects you, please login there and check the option "this issue affects me". – Pablo Fischer Mar 25 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.