Hi, I am querying a test AD that I set up today, that is its own forest and DNS - the name is OPENTEST.EXAMPLE. I created a user called "jfogarty" on it, so the logon is "OPENTEST\jfogarty". This user is part of the "Domain Users" group, but not "Users".
I am trying to use VB to see if that user is there, but no matter what, it doesn't show up - for example, I can find the ASPNET or Adminstrator user, but I cannot find anything whose CN or UID has my login.
I check by result.Count()
For example, working:
For example, non-working:
What am I doing wrong?
Thanks!
James
I am trying to use VB to see if that user is there, but no matter what, it doesn't show up - for example, I can find the ASPNET or Adminstrator user, but I cannot find anything whose CN or UID has my login.
I check by result.Count()
For example, working:
Code:
deSearch.Filter =
"(&(|(objectClass=User)(objectClass=Domain User))(cn=Administrator))"
Dim results As SearchResultCollection = deSearch.FindAll()
'deSearch.Filter = "(&(objectClass=User)(cn=Adminstrator))" 'WORKING
'deSearch.Filter = "(&(objectClass=User)(sn=Fogart*))" 'WORKING
Code:
deSearch.Filter = "(&(|(objectClass=User)(objectClass=Domain User))(uid=jfog))"
Dim results As SearchResultCollection = deSearch.FindAll()
deSearch.Filter = "(&(|(objectClass=User)(objectClass=Domain User))(cn=OPENTEST\*))"
Dim results As SearchResultCollection = deSearch.FindAll()
deSearch.Filter = "(&(|(objectClass=User)(objectClass=Domain User))(cn=*jfog*))"
Dim results As SearchResultCollection = deSearch.FindAll()
Thanks!
James