Hello,
This is my first attempt at accessing the Active Directory. I enter database records from users in the active directory.
Recently it was brought to my attention that I am missing some names.
For instance, two guys in our department. One has his name in the list, but the other does not. I had our IT guy look at the AD profiles and they are both in there and appear to be the same.
So I thought perhaps the filters are playing apart. After testing different filters I can see the missing people.....but it only returns a set number of records. It does not return the full alphabet of active directory users (like one filter always stops at the 'H's or 'G's).
Below are some commented out filters that I have tried. The original filter brings back 614 records and it goes through the alphabet of names, but I am missing records.
Another filter will bring back only 312 or 313 records of which both missing and non-missing records are there but only up to the letter 'H' in the alpha bet.
Do I need to set a number of records allowed returned or something? Or what filter will return ALL entries? And how come when I don't use a filter at all I get back 156 records?
' search.Filter = "(&(objectClass=user)(objectCategory=person)(showInAddressBook=*))" '---This is used if not using the if statement below checking if it's person ' search.Filter = "(|(objectClass=user)(showInAddressBook=*))" ' records - but missing records ' search.Filter = "(&(objectClass=user)(showInAddressBook=*))" ' 614 records - but missing records ' search.Filter = "(objectClass=*)" ' 156 with missing records ' search.Filter = "(&(objectClass=*)(showInAddressBook=*))" ' 585 missing records ' search.Filter = "(&(objectClass=user)(objectClass=*))" ' 312 with missing records ' search.Filter = "(&(objectClass=person)(objectClass=user))" ' 312 with missing records ' search.Filter = "(|(objectClass=person)(objectClass=user))" ' 166 with missing records ' search.Filter = "(|(objectClass=*)(showInAddressBook=*))" ' 156 records - but missing records ' NO filter at all and only 156 records ? search.Filter = "(objectClass=user)" ' only 313 records returned and stops at letter H but missing records are included search.Sort.Direction = SortDirection.Ascending search.Sort.PropertyName = "DisplayName" search.PropertiesToLoad.Add("mail") search.PropertiesToLoad.Add("DisplayName") search.PropertiesToLoad.Add("physicalDeliveryOfficeName") search.PropertiesToLoad.Add("department") search.PropertiesToLoad.Add("telephoneNumber") search.PropertiesToLoad.Add("DistinguishedName") search.PropertiesToLoad.Add("objectClass")
Thanks for your time.