Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="http://www.codeproject.com/KB/system/everythingInAD.aspx" rel="nofollow noreferrer">Howto: (Almost) Everything In Active Directory via C#</a> is very helpfull and also includes instructions on how to iterate AD members in a group.</p> <pre><code>public ArrayList Groups(string userDn, bool recursive) { ArrayList groupMemberships = new ArrayList(); return AttributeValuesMultiString("memberOf", userDn, groupMemberships, recursive); } </code></pre> <p>You will also need this function:</p> <pre><code>public ArrayList AttributeValuesMultiString(string attributeName, string objectDn, ArrayList valuesCollection, bool recursive) { DirectoryEntry ent = new DirectoryEntry(objectDn); PropertyValueCollection ValueCollection = ent.Properties[attributeName]; IEnumerator en = ValueCollection.GetEnumerator(); while (en.MoveNext()) { if (en.Current != null) { if (!valuesCollection.Contains(en.Current.ToString())) { valuesCollection.Add(en.Current.ToString()); if (recursive) { AttributeValuesMultiString(attributeName, "LDAP://" + en.Current.ToString(), valuesCollection, true); } } } } ent.Close(); ent.Dispose(); return valuesCollection; } </code></pre> <p>If you do now want to use this AD-method, you could use the info in this article, but it uses unmanaged code:</p> <p><a href="http://www.codeproject.com/KB/cs/groupandmembers.aspx" rel="nofollow noreferrer">http://www.codeproject.com/KB/cs/groupandmembers.aspx</a></p> <p>The sample application that they made:</p> <p><img src="https://i.stack.imgur.com/9Vt9Z.jpg" alt="alt text"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload