Howdy!
i am trying to search LDAP from an Access 2003 module. I want to return
the
username on an account from a SAMAccountname.
The following code works: It returns the SAMAccountName (coryL) from LDAP
when using the Username:
Public Sub test()
Set AdUsr = GetObject("LDAP://CN=Cory
Laidlaw,OU=SBSUsers,OU=Users,OU=MyBusiness,DC=Beyond01,DC=local")
Debug.Print AdUsr.samaccountname
End Sub
However, trying the reverse fails, as in this code, it returns "There is
no
such object on the server"
Public Sub testfails()
Set AdUsr =
GetObject("LDAP://CN=CoryL,OU=SBSUsers,OU=Users,OU=MyBusiness,DC=Beyond01,DC=local")
Debug.Print AdUsr.UserName
End Sub
Can anyone help me see where I am going astray? thanks much!


|