# Multiple group\_search.base\_dn for one LDAP/AD

**URL:** <https://discuss.elastic.co/t/multiple-group-search-base-dn-for-one-ldap-ad/270746>\
**Category:** Elasticsearch\
**Created:** [April 20, 2021, 5:40pm UTC](https://discuss.elastic.co/t/multiple-group-search-base-dn-for-one-ldap-ad/270746 "2021-04-20T17:40:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ctan](https://avatars.discourse-cdn.com/v4/letter/c/c5a1d2/32.png) [@ctan](https://discuss.elastic.co/u/ctan)\
**Post date:** [April 20, 2021, 5:40pm UTC](https://discuss.elastic.co/t/multiple-group-search-base-dn-for-one-ldap-ad/270746/1 "2021-04-20T17:40:23Z")

</div>

We have two spots for groups to reside inside of AD, which are not children of the same folders (but in the same domain). I am looking for a way to have ES search them both to get the group membership, while not traversing the other the entire domain. I am looking for something like this, and wanted to see if anyone had suggestions or cautions on adding multiple base\_dn for group searches.

```auto
group_search:base_dn:("OU=Groups,OU=ES,OU=Services,DC=ad,DC=local","OU=Groups,OU=CompanyName,DC=ad,DC=local")

```

We are on AD realm currently, and will be moving to LDAP in the near future. Anybody else go through this? Is adding another realm the solution (though it seems overkill as the users are not different)?

---

<div class="post-metadata">

**Author:** ![ctan](https://avatars.discourse-cdn.com/v4/letter/c/c5a1d2/32.png) [@ctan](https://discuss.elastic.co/u/ctan)\
**Post date:** [April 20, 2021, 6:07pm UTC](https://discuss.elastic.co/t/multiple-group-search-base-dn-for-one-ldap-ad/270746/2 "2021-04-20T18:07:44Z")

</div>

As an additional ask:

Is it possible to filter specific words out of the groups returned? Specifically looking to drop distribution groups from the results.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 18, 2021, 6:08pm UTC](https://discuss.elastic.co/t/multiple-group-search-base-dn-for-one-ldap-ad/270746/3 "2021-05-18T18:08:23Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
