# How to sync LDAP (AD) groups

**URL:** <https://forums.rocket.chat/t/how-to-sync-ldap-ad-groups/8405>\
**Category:** Community Support\
**Created:** [September 2, 2020, 1:58pm UTC](https://forums.rocket.chat/t/how-to-sync-ldap-ad-groups/8405 "2020-09-02T13:58:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![klepptor](https://avatars.discourse-cdn.com/v4/letter/k/3be4f8/32.png) [@klepptor](https://forums.rocket.chat/u/klepptor)\
**Post date:** [September 2, 2020, 1:58pm UTC](https://forums.rocket.chat/t/how-to-sync-ldap-ad-groups/8405/1 "2020-09-02T13:58:29Z")

</div>

### Description

I would like to add channels from our AD groups automatically, but, as many others here, I can’t get it wo work out of the box.

Our AD structure is like this:

OU=groups,DC=eins,DC=zwei,DC=de  
CN=LG\_Chat,OU=groups,DC=eins,DC=zwei,DC=de (only members of this group are allowed to login, no nested groups here so far)

**inside** the OU “groups” there are other OUs like

OU=Untergruppe1,OU=groups,DC=eins,DC=zwei,DC=de  
CN=LG\_Tool1,OU=Untergruppe1,OU=groups,DC=eins,DC=zwei,DC=de  
CN=LG\_Tool2,OU=Untergruppe1,OU=groups,DC=eins,DC=zwei,DC=de

OU=Untergruppe2,OU=groups,DC=eins,DC=zwei,DC=de  
CN=LG\_Tool3,OU=Untergruppe1,OU=groups,DC=eins,DC=zwei,DC=de  
CN=LG\_Tool4,OU=Untergruppe1,OU=groups,DC=eins,DC=zwei,DC=de

Some of the members of LG\_Chat, who are allowed to login, are members of e.g. LG\_Tool1,…

I want RC to add these usere to the corresponding channels

#Tool1 → members of LG\_Tool1

RC creates the channels, but no users are added, I can’t find anything in the logs.

LDAP Group BaseDN:

CN=LG\_Chat,OU=groups,DC=eins,DC=zwei,DC=de

![grafik](https://us1.discourse-cdn.com/flex021/uploads/rocketchat/original/2X/2/226829efc5146d0dbfe77f423356878d8d87b509.png)

LDAP Group Channel Map:

{  
“LG\_Tool1”: “Tool1”,  
“LG\_Tool2”: “Tool2”  
}

Any hints on this, please??? 😉

### Server Setup Information

- Version of Rocket.Chat Server: 3.5.3
- Operating System: Debian 10
- Deployment Method: docker
- Number of Running Instances: 1
- DB Replicaset Oplog: yes
- NodeJS Version: 12.16.1
- MongoDB Version: 4.0.16
- Proxy: Citrix ADC
- Firewalls involved: Checkpoint

### Any additional Information
