User login failed (LDAP auth) duplicate username in mongoDB


Server Setup Information

  • Version of Rocket.Chat Server: 3.17.0
  • Operating System: Ubuntu 20.04.3 LTS
  • Deployment Method: tar
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: 12.22.1 - x64
  • MongoDB Version: 4.0.20
  • Proxy: nginx
  • Firewalls involved:

Any additional Information

I’ve got one single user that can not login using LDAP credentials: logs report

server.js:204 System ➔ error Exception while invoking method login LDAP Authentication succeeded, but there’s already an existing user with provided username [username] in Mongo. [LDAP-login-error]

I’ve already removed avatar sync from settings and removed user from all channels.

Any idea?


I got passed it by doing .isNew = false; But still, this error confuses me very much. If anyone can elaborate, please.

Hi, any chance you can tell me how exactly you did .isNew = false; ?

kind regards