Active Directory Syntax

I am doing Active Directory Integration in C#, and facing a small issue: Returned properties of an users such as "memberof", "telephone",... are not recognized as singularly-valued attributes so normal syntax like "memberof=MyUserGroup" will not work. If anyone has come accross this problem, or can refer me to another forum to get help,please give me your insights. Thanks.

PS: I could filter the returned objects to get the collection I originally want, but that's not prefered.




Answer this question

Active Directory Syntax

  • OOC#

    You need to specify the dn of MyCustomGroup, not just the RDN.

  • csmith54

    Those properties are multi-valued attributes so they contain more than one value. You can enumerate those values one by one.

    I am not clear from reading your email regarding your exact usage and what exactly does not work. Your further clarification is appreciated.



  • Steve Ward

    I wanted to query users only in a particular group, say "MyCustomGroup", but such syntax wouldn't work: (memberof=MyCustomGroup) or (*memberof=MyCustomGroup*), since the object is multi-valued and there is no specified value entry to compare to.

    I could query users all users of all groups using (memberof=*), and then populate the collection I want from my end. But thats not really efficient.



  • Active Directory Syntax