Unable To Retrieve Given Name From User During Rule Flow

Overview

The customer is not able to retrieve the family_name attribute from their google enterprise connection. In google side they see the following:

{

[...]

"id": "<ID>",

"primaryEmail": "<PrimaryEmail>",

"name": {

"givenName": "<GivenName>",

"familyName": "<familyName>",

"fullName": "<fullName>"

},


But when trying to manipulate one of the passed values from their IdP (family_name) they get the following error (in the tenant logs):


{
[...]
  "type": "f",
  "description": "Family name not set in IDP response.",
[...]
}

 

Symptoms
The Application flow fails in the rules flow as the family_name field does not exist

Applies To

  • Rules

Cause

Based on the engineers response, this seems to due to a wrong mapping in the google-apps strategy on our end.

https://github.com/auth0/auth0-server/blob/master/packages/server/lib/auth/strategies/google-apps.js#L20

 

Troubleshooting
Logs found:

{
[...]
  "type": "f",
  "description": "Family name not set in IDP response.",
[...]
}

They are receiving the previously mentioned error because of a validation they have in their rules, which is done to proof that the family_name is not being handled:

if ( typeof( user.family_name ) === "undefined" ) {

return callback( new Error( 'Family name not set in IDP response.' ));

}

 

Solution

Because this code has been this way for 10 years it may need some investigation as to whether changing it will impact existing customer connections.
A Backlog Item has been created for this: FDR-323
 

Recommended content

No recommended content found...