title: How to get SID of a group once i get groups of a user in Active Directory?
body: <p>I am using DirectorySearcher to get groups of a User in ActiveDirectory. </p>
  
  <p>My Question is how to get SID associated with each group once i get user groups using "memberOf"?</p>
  
  <p>I am working in .NETFramework 2.0 Environment.</p>
  
  <pre><code>DirectoryEntry entry = new DirectoryEntry(string.Format("LDAP://{0}", sUserDomain));
  DirectorySearcher mySearcher = new DirectorySearcher(entry);
  mySearcher.Filter = string.Format("(&amp;(objectClass=user) (cn= {0}))", ui.DisplayName.ToString());
  mySearcher.PropertiesToLoad.Add("memberOf");
  SearchResult searchresult = mySearcher.FindOne();
  </code></pre>