This project is read-only.


Jan 18, 2011 at 2:02 PM

For those who have downloaded, has it been easy to use?  Are you using it with Active Directory or a different LDAP server?  I've done most of my testing with Lightweight Directory Services, but I plan to test with Apache Directory and OpenLDAP as well.

Mar 20, 2011 at 12:03 PM

Dear Hatter,

Many thanks for this outstanding library. A common requirement we need often is to search the members of an Active Directory group or

to test for membership of a AD group. Should it be possible to implement this as a Linq keyword (e.g. MemberOf(...), Members(...) ) instead of specifying it in the

filter ?


Kind regards,




Mar 22, 2011 at 1:33 AM
Edited Mar 22, 2011 at 1:36 AM


Thanks for the support!  If I understand you correctly, this is currently supported.  If you map the Members property of a group or the MemebersOf property of a user, you can do something likes this:

string userDn = "CN=John Doe,OU=Users,DC=server,DC=com";
var context = new DirectoryContext();
bool hasMember = context.Query()
     .Where(g => g.Cn == "group name" && g.Members.Contains(userDn)).Any();

The filter will look something like: (&(Cn=group name)(Members=CN=John Doe,OU=Users,DC=server,DC=com))

Is this the functionality you're looking for?

Mar 23, 2011 at 8:12 AM

OK. Thanks for pointing me in the right direction.

Maybe you can add the above snippet to your project as demo code or example.


Mar 24, 2011 at 2:30 AM

I'll do that.  Thanks for the suggestion, John.