Remove the Username Attribute from a Database Connection User Profile using the Management API
Last Updated:
Overview
Users were incorrectly imported with a username attribute in the context of a database connection. The username attribute is not required for these user profiles. An error occurs when attempting to set the username attribute through the Management API to null or undefined.
Applies To
- Username attribute
- Management API
Solution
The self-service alternatives always imply the recreation of the user profile; if the connection is a custom database connection the user could be removed and the custom scripts updated to ensure that username is not returned on a subsequent login. If the connection is a custom database connection with import mode enabled the situation is more complex as removing the user may imply their current credentials (password) is lost if the user changed their password after they got migrated into the tenant.
It's technically possible to request an export of password hashes and re-import all the users (without the username) into a new connection, however, this will imply either a maintenance window where logins are unavailable (time it will take to delete the original connection and re-import the users into a new connection) or it will require importing users with different user identifiers.