title: Getting all members of a group and its subgroups
body: <p>I have groups as such:</p>
  
  <ul>
  <li>GroupA
  <ul>
  <li>GroupB
  <ul>
  <li>Users</ul>
  <li>GroupG
  <ul>
  <li>Users
  </ul>
  </ul>
  </ul>
  
  <p>So the goal is to get all users that are members of parent group GroupA.</p>
  
  <p>I have the following filter:</p>
  
  <pre><code>(&amp;(objectCategory=Person)(objectClass=User)(mail=*MyEmailDomain.com)(memberOf=CN=GroupB,OU=MyOU3,OU=MyOU2,OU=MyOU1,DC=MyDomain,DC=LOCAL))
  </code></pre>
  
  <p>Which works for the lowest level groups.</p>
  
  <p>From research, it seems that this should work, but doesn't:</p>
  
  <pre><code>(&amp;(objectCategory=Person)(objectClass=User)(mail=*MyEmailDomain.com)(memberof:1.2.840.113556.1.4.1941:=(CN=GroupA,OU=MyOU3,OU=MyOU2,OU=MyOU1,DC=MyDomain,DC=LOCAL)))
  </code></pre>
  
  <p>If it matters, I'm using Active Directory Explorer to get the Distinguished Names, and the LDAP Input step in Pentaho's Data Integration tool (Kettle/PDI) to retrieve the data.</p>