Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Can't get users present in Domain users in Active directory?
- string sADPath = "LDAP://" + tbDomain.Text;
- string username = tbUsername.Text;
- string password = tbPassword.Text;
- DirectorySearcher mySearcher = new DirectorySearcher(directoryEntry);
- int MaxResults = Int32.MaxValue - 1;
- ComboBoxItem selectItem = (ComboBoxItem)ddlGroups.SelectedItem;
- String value = selectItem.Value;
- mySearcher.Filter = ("(&(objectCategory=person)(objectClass=User)(memberOf=" + value + "))");
- mySearcher.SearchScope = SearchScope.Subtree;
- foreach (SearchResult temp in mySearcher.FindAll())
- {
- }
Add Comment
Please, Sign In to add comment