title: C# - Find all email addresses for an Active Directory user
body: <p>I'm trying to get all the email addresses associated to a given AD user.</p>
  
  <p>For the user I have the domain and the login name (ex. DOMAIN\UserName) and I the AD is storing the email addresses in:</p>
  
  <ol>
  <li>The mail attribute.</li>
  <li>In <code>proxyAddresses</code> attributes.</li>
  </ol>
  
  <p>So far, I don't know what C# API to use to connect to the AD, and how to properly filter by the user to fetch all the email addresses. I'm using .NET 3.5.</p>
  
  <p>Thank you.</p>