Login after using LDAP Group Channel Map not possible

Description

We are using Rocket Chat with AD Integration and AD Sync. We also use User Data Group Map and LDAP Group Channel Map. We have two existing LDAP Group Channel Map entrys and that is working fine.

If we add Users to the AD Group where the user search filter is set to, these users are created correctly.

Now i add a third LDAP Group Channel Map entry. After that i can not login anymore in Rocket Chat.The new LDAP Group is created in Rocket Chat but no user can login.

If i delete this LDAP Group Channel Map i can login again with my users.

Group Filter looks like this:
(&(sAMAccountName=#{username})(memberOf:1.2.840.113556.1.4.1941:=CN=#{groupName},OU=RocketChat,DC=my,DC=com,DC=com))

LDAP Group BaseDN
OU=RocketChat,DC=my,DC=com,DC=com

LDAP Group Channel Map
{
“RC_Test”: “Test”,
“RC_IT”: “IT”,
“RC_Einkauf”: “Einkauf” <–If i add this line, no login is possible
}

Server Setup Information

  • Version of Rocket.Chat Server: 2.4.2
  • Operating System: Ubuntu LTS
  • Deployment Method: snap
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: v8.17.0
  • MongoDB Version: 3.6.14
  • Proxy: caddy
  • Firewalls involved:no

Any additional Information

In the Logs i can see this entrys:

I20200204-09:02:32.212(0) server.js:204 LDAPSync ➔ error Error creating user { Error: Username already exists. [403]     at AccountsServer.insertUserDoc (packages/accounts-base/accounts_server.js:1108:15)     at AccountsServer.<anonymous> (server/lib/accounts.js:180:28)     at executeBound (/snap/rocketchat-server/1420/programs/server/npm/node_modules/underscore/underscore.js:762:67)     at AccountsServer.bound [as insertUserDoc] (/snap/rocketchat-server/1420/programs/server/npm/node_modules/underscore/underscore.js:793:14)     at createUser (packages/accounts-password/password_server.js:1078:27)     at AccountsServer.Accounts.createUser (packages/accounts-password/password_server.js:1147:10)     at addLdapUser (app/ldap/server/sync.js:452:29)     at ldapUsers.forEach.ldapUser (app/ldap/server/sync.js:518:5)     at Array.forEach (<anonymous>)     at app/ldap/server/sync.js:485:13     at runWithEnvironment (packages/meteor.js:1286:24)   isClientSafe: true,   error: 403,   reason: 'Username already exists.',   details: undefined,   message: 'Username already exists. [403]',   errorType: 'Meteor.Error' } 

I20200204-09:02:32.340(0) Exception in callback of async function: { Error: A channel with name ‘Einkauf’ exists [error-duplicate-channel-name] at getValidRoomName (app/utils/lib/getValidRoomName.js:16:11) at createRoom (app/lib/server/functions/createRoom.js:48:9) at createRoomForSync (app/ldap/server/sync.js:279:15) at app/ldap/server/sync.js:319:12 at Function..map..collect (/snap/rocketchat-server/1420/programs/server/npm/node_modules/underscore/underscore.js:205:24) at mapLDAPGroupsToChannels (app/ldap/server/sync.js:311:4) at syncUserData (app/ldap/server/sync.js:348:23) at addLdapUser (app/ldap/server/sync.js:458:2) at ldapUsers.forEach.ldapUser (app/ldap/server/sync.js:518:5) at Array.forEach () at app/ldap/server/sync.js:485:13 at runWithEnvironment (packages/meteor.js:1286:24) isClientSafe: true, error: ‘error-duplicate-channel-name’, reason: ‘A channel with name ‘Einkauf’ exists’, details: { function: ‘RocketChat.getValidRoomName’, channel_name: ‘Einkauf’ }, message: ‘A channel with name ‘Einkauf’ exists [error-duplicate-channel-name]’, errorType: ‘Meteor.Error’ }