KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have code that searches for all users in a department: string Department = "Billing"; DirectorySearcher LdapSearcher = new DirectorySearcher(); LdapSearcher.PropertiesToLoad.Add("displayName"); LdapSearcher.PropertiesToLoad.Add("cn"); LdapSearcher.PropertiesToLoad.Add("department"); LdapSearcher.PropertiesToLoad.Add("title"); LdapSearcher.PropertiesToLoad.Add("memberOf"); LdapSearcher.Filter = string.Format("(&(objectClass=user)(department={0}))", Department); SearchResultCollection src = LdapSearcher.FindAll(); What would the filter need to look like if I only wanted everyone in the "Manager Read Only" AD Group? Am I going about this all wrong?
Tags (comma-separated)
Save Edits
Cancel