Remove Required User Attributes In Auth0 Social Connections

Overview

Some Auth0 social connections require user attribute fields that administrators cannot disable from the Management Dashboard because additional attributes accompany the values that Auth0 requires to function. Administrators can exclude these attributes from the user profile saved in the Auth0 tenant by specifying them in the non_persistent_attrs array.

Applies To

  • Auth0
  • Social Connections
  • Management API

Cause

Some additional attributes accompany the values that Auth0 requires to function. Auth0 cannot downscope these attributes further. For example, in the Facebook social connection, the required public_profile includes id (which Auth0 needs to identify the user) and various other attributes (picture, name_format, etc.).

Permissions

Solution

How are required user attributes removed?

Exclude specific attributes from the user profile by updating the connection settings via the Management API.

  • Identify the attributes to exclude from the user profile. The attribute names should match those used in the Auth0 tenant (not those sent by the Identity Provider).
  • Send a PATCH request to the Management API to update the non_persistent_attrs array for the specific connection.
PATCH https://<Tenant Domain>/api/v2/connections/<Connection ID>

{
  "options": {
    (... other parameters),
    "non_persistent_attrs": [
      "picture"
    ]
  }
}

NOTE: Auth0 does not provide a comprehensive list of safe attributes to deny. Administrators must test the configuration in a development environment first. For example, denying the picture attribute rarely causes issues, but denying the email attribute prevents some features from functioning.

Recommended content

No recommended content found...