title: Find LDAP Groups and Member emails
body: <p>I am trying to search for All Groups and Members under a specific OU in my Active Directory. </p>
  
  <p>The below query works fine. </p>
  
  <pre><code>ldapsearch -o ldif-wrap=no -b OU=BUSINESS_DOMAIN,OU=ONE,DC=myserver,DC=com -s one '(cn=*)' member cn
  </code></pre>
  
  <p>I can get the group names and member names(CN) from the AD. But is there a way to get the member emails as well? </p>
  
  <p>Should I iterate over each member and trigger a separate LDAP Search programmatically or can I create a chained query? </p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Based on the comments, adding more clarity- I am looking for email id of all users  embedded under groups under a given OU. </p>