We’re trying to migrate a block of users to LDAP auth, but are blocked by a duplicate entry
Steps to reproduce
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?
If the dry-run succeeds, I expect the actual migration to succeed as well.
See the above error