title: C# List all email addresses in MS Exchange
body: <p>I need to get list of all emails from exchange/active directory.<br/>Whether emails like j.doe@domain.com or email groups like all-contacts or CEO which they includes couple of email addresses.<br/>
  this is my code so far:<br/></p>
  
  <pre><code>DirectoryEntry de = new DirectoryEntry(ad_path);
  DirectorySearcher ds = new DirectorySearcher(de);
  ds.Filter = "(&amp;(objectClass=addressBookContainer)(CN=All Global Address Lists,CN=Address Lists Container,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=mydomain,DC=local))";
  SearchResultCollection ss = ds.FindAll(); // count = 0
  </code></pre>