Summary
We’re trying to migrate a block of users to LDAP auth, but are blocked by a duplicate entry
Steps to reproduce
v5.5.0 E10
I run the CLI command “sudo /opt/mattermost/bin/mattermost user migrate_auth email ldap email --dryRun” and get a report of emails not matched, this is fine and expected. Then I run the same command without the “–dryRun”, and I get the following error: “Error: Error while migrating users: MigrateToLdap: Unable to migrate AD/LDAP users with specified field. Duplicate entry detected. Please remove all duplcates and try again., email= username=[username]”
I’ve checked MatterMost (System Console > Reports > Users) and there is no user by that username. I suspect this might be a case of our AD containing multiple usernames without an email, but why would MatterMost be checking AD for any email-addresses that don’t belong to registered users?
Is there a way to list all users in the MatterMost database through the CLI? I’m not really comfortable poking the database with SQL to find out… Or can I rely on Reports > Users to list all users, including ones without email?
Expected behavior
If the dry-run succeeds, I expect the actual migration to succeed as well.
Observed behavior
See the above error