title: How can I make a LDAP query that returns only groups having OU=Groups from all levels?
body: <p>If I am looking for all <code>Groups</code>, I get too much garbage. </p>
  
  <p>If I try to narrow down the base, I get too few.</p>
  
  <p>Here is an example:</p>
  
  <pre><code>CN=A Team,OU=Groups,OU=Americas,DC=example,DC=com
  CN=B TEAM,OU=Groups,OU=EMEA,DC=example,DC=com
  CN=C Team,OU=Legacy Groups,DC=example,DC=com
  CN=D Team,OU=Groups,OU=Bangalore,OU=APAC,DC=example,DC=com
  CN=E Team,OU=Common Groups,DC=example,DC=com
  </code></pre>
  
  <p>I am looking for a LDAP <code>filter</code> that returns A B D E (without C) - mainly the logic would be get me all groups that do have last <code>OU=Groups</code> or <code>OU=Common Groups</code></p>
  
  <p>My current search is using:</p>
  
  <pre><code> Search base: CN=Users,DC=citrite,DC=net
   Filter: (objectCategory=Group)
  </code></pre>