Last post Nov 18, 2010 12:48 AM by BuddyNoSPam
Nov 18, 2010 12:48 AM|BuddyNoSPam|LINK
I am having a problem where only certain domain users can search the AD using the whenChanged attribute. The following filter will work for some users but not others.
I even went so far as to make one of the users that was having a problem a Domain Admin just to see if that fixed the problem (it didn't). For those users the test oResult.Properties.Contains("whenChanged") returns false. Below is the whole code:
myDE = New DirectoryEntry("LDAP://test/OU=Users1,OU=SubCloset,OU=Closet,OU=OfficeOU,dc=test")
Dim oSearcher As DirectorySearcher = New DirectorySearcher(myDE)
Dim oResults As SearchResultCollection
oSearcher.filter = "(&(objectClass=user)(whenChanged>=20101101010000.0-0500))"
oSearcher.PageSize = 1000
oResults = oSearcher.FindAll()
I don't recall having this problem previously and I have this type of code running at a lot of customers without any apparent problem. Maybe there is just something wrong with my test AD installation. Can anyone think of any reason that this property would
be unavailable to certain users?