# LDAP not synchronizing correctly

**URL:** <https://forums.rocket.chat/t/ldap-not-synchronizing-correctly/9075>\
**Category:** Community Support\
**Tags:** rocketchat-apps\
**Created:** [October 25, 2020, 11:32pm UTC](https://forums.rocket.chat/t/ldap-not-synchronizing-correctly/9075 "2020-10-25T23:32:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![honezk9](https://avatars.discourse-cdn.com/v4/letter/h/e95f7d/32.png) [@honezk9](https://forums.rocket.chat/u/honezk9)\
**Post date:** [October 25, 2020, 11:32pm UTC](https://forums.rocket.chat/t/ldap-not-synchronizing-correctly/9075/1 "2020-10-25T23:32:40Z")

</div>

### Description

I have a new install of RC. I am attempting an LDAP connection to an MS Active Directory to download add the users to RC.  
Under the LDAP tab  
I have connected to host by SERVERNAME.Domain.local which correctly resolves in DNS.  
No encryption is selected.  
Under the base DN I have use the path to the OU in the form of  
ou=SBSUsers,ou=Users,ou=MyBusiness, dc=DOMAINNAME,dc=local

When I click test connection it successfully test correctly.

The expected result is that it searches the defined OU for user objects to import into RC.  
The actual result is 2 users from this OU have been imported and users from a random other OU. I have tried just using from the MyBusiness down. but the result doesnt change. I am not using a group filter, but would like to if I can get the AD import to work.

### Server Setup Information

- Version of Rocket.Chat Server: 3.7.1
- Operating System: Centos
- Deployment Method: 
- Number of Running Instances: 1
- DB Replicaset Oplog:
- NodeJS Version: 12.14
- MongoDB Version: 4.0.9
- Proxy: 
- Firewalls involved:

### Any additional Information

---

<div class="post-metadata">

**Author:** ![honezk9](https://avatars.discourse-cdn.com/v4/letter/h/e95f7d/32.png) [@honezk9](https://forums.rocket.chat/u/honezk9)\
**Post date:** [November 6, 2020, 3:48am UTC](https://forums.rocket.chat/t/ldap-not-synchronizing-correctly/9075/2 "2020-11-06T03:48:59Z")

</div>

Oddly enough the issue was not setting the default email domain. Once that was set, all accounts synced.
