Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > ADSI General > Searching LDAP ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 5339 of 5422
Post > Topic >>

Searching LDAP by SamAccountName

by =?Utf-8?B?Q29yeSBKLiBMYWlkbGF3LCBCZXlvbmQwMS5jb20=?= <CoryJLaidl Jul 24, 2008 at 10:05 AM

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!
 




 3 Posts in Topic:
Searching LDAP by SamAccountName
=?Utf-8?B?Q29yeSBKLiBMYWl  2008-07-24 10:05:00 
Re: Searching LDAP by SamAccountName
"Richard Mueller [MV  2008-07-24 13:03:41 
Re: Searching LDAP by SamAccountName
=?Utf-8?B?Q29yeSBKLiBMYWl  2008-07-25 07:22:01 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Dec 2 4:42:59 CST 2008.