function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kate KitchoKate Kitcho 

Set Up Social Sign-On TrailHead Unit 2018 - Missing Last Name

Hi All,

It looks like this unit has been causing trouble for many, but I haven't been able to find someone who is encountering the same error I am, so hoping someone here can help. The error is as follows: "Problem Logging In We can't log you in because of the following error. ERROR_CREATING_USER: Required fields are missing: [Last Name]"

Error message

I have read through as many threads on this as I could find and have tried many of the common solutions, all having failed to resolve my issue:

1) Google as a login option is enabled under Administration > Login & Registration
2) I have tried logging in through Google on both the Partner and Customer communities that you create as part of this module
3) I did launch the URL in an incognito tab
4) I used the Module3RegistrationHandler.cls for my Apex class from the following location: https://github.com/salesforceidentity/IdentityTrail-Module3

I'm a BA/Admin so the code is over my head; can someone please help? I would really like to clear this unit.

Thank you in advance!
Kate
Kate KitchoKate Kitcho
Hi Santosh,

Thanks for your answer. Do you mean for me to replace all 7 instances of each in the code? When I do that, or even just replace one, I get an error saying that the variable "family_name" or "given_name" does not exist.

I do have the Partners profile created.

Best,
Kate

 
Santosh Bompally 8Santosh Bompally 8
Hi Kate, 

You're right about the error. I've deleted the prev response for others not to get misguided. I've tested this and everything seems to be working fine for me. Can you post the value of "data" from debug log ?? 
Kate KitchoKate Kitcho
Hi Santosh, thanks again for trying to help. I figured it out! The issue was that my Google Account did not have the last name field populated. Since Google wasn't passing this to Salesforce but the value was required, the error was triggering. I logged in with an alternate Google Account and it worked. I assume that if I populate the last name field on my original Google Account, that would work too. I successfully cleared the unit - all good now!