Options.set_user_root_attributes Not Returned in getConnection Call

Overview

When creating an enterprise connection, it is possible to configure the ability to sync user profile attributes upon login using the options.set_user_root_attributes attribute.

  • This frequency can be set to “sync at each login” or “on first login only”

This article explains why the Connection’s raw JSON will not show the options.set_user_root_attributes attribute by default.

Applies To

  • Enterprise Connection
  • AzureAD
  • User Provisioning

Cause

The options.set_user_root_attributes will only be provided in the Connection object if set_user_root_attribues is changed from the default value, which is “sync at each login”.

Solution

This value can be changed via the Auth0 Tenant dashboard or via a management API call:

Auth0 Dashboard:

  1. Create a new Connection
  2. Navigate to Provisioning and enable “Sync User Attributes at Login”
  3. Change "Sync frequency from “on each login” to “on first login only”
  4. Change "Sync frequency from “on first login only” back to “on each login”

Management API:

  1. Update a connection via the Update a connection API endpoint and specify the “set_user_root_attributes”: “on_each_login” within the “options” object as so
"options": {
    "set_user_root_attributes": "on_each_login"
  }
  • Note that this update call will override the options object. To reduce unexpected changes, be sure to make a GET Connection call to receive the connection’s current “options” object

Now, after making a getConnection API call, the options.set_user_root_attributesl is now provided.