Username migration
From a login perspective, the primary identifier for a user is their email address. If you are migrating from locally based authentication to SSO or you're migrating from one IdP to another, you may be required to update users email addresses.
To help with this, a script is provided that will migrate user emails using a CSV file with the following format:
oldEmail,newEmail
After performing some validation checks, the script will iterate through the CSV file and update the users' email addresses from oldEmail
to newEmail
.
Validation
Before running the migration the <csv_file>
will be checked to ensure that:
For each row, both the
oldEmail
and thenewEmail
are valid email addressesThere are no duplicate entries, for example, you are not attempting to update different users to the same new email address or you are attempting to update the same user account with an already-used email address
Usage
Flags
--commit
The inclusion of the --commit
flag will actually do the migration. When omitted, the migration will happen in a dry-run mode where no changes are made but validation is still performed.
Default:false
--continue
The --continue
flag will continue the migration process if a user account if the email address on the account has already been updated
--ignore-missing
The --ignore-missing
flag will continue the migration process if a user account was not found
--admin-id
The --admin-id
should be set to the ID of the Administrator who is performing the migration and will be used for audit log entries. Go to Admin > Manage Users and search for your email address and click on the first result to find your user-id.
<csv_file>
The <csv_file>
is the file with the old and new email addresses in
Completion
While executing the migration script, depending on the flags that you have chosen will determine whether an error is logged to the console and then continues, or logged to the console and exits. If the script terminates prematurely due to an error, it will exit with code 1 to denote that it was unsuccessful.
On completion of the migration, the script will log the number of successful, failed, and skipped updates to the console. If the migration is completed successfully it will exit with code 0.
Last updated
Was this helpful?