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:
- Create a new Connection
- Navigate to Provisioning and enable “Sync User Attributes at Login”
- Change "Sync frequency from “on each login” to “on first login only”
- Change "Sync frequency from “on first login only” back to “on each login”
Management API:
- 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.