How can I getObject based on displayName without using adodb?

How can I getObject based on displayName without using adodb?

Post by Tulio Quinone » Sun, 03 Mar 2002 08:31:45



I am trying to get an object when I know its displayname and the container
it is in.

I would like to use LDAP provider if possible.

Thanks

 
 
 

How can I getObject based on displayName without using adodb?

Post by RIchard Muelle » Sun, 03 Mar 2002 11:16:57


In Active Directory Users & Computers, what you see in the
field labeled "Name" is cn (common name). What you see in
the field labled "Display Name" is DisplayName, which is
an optional property of the LDAP user object. If you know
the user is cn=MyUser and the container is cn=users, you
can bind with:

Get oUser = GetObject
("LDAP://cn=MyUser,cn=users,dc=MyDomain,dc=com")

If you know DisplayName, you will have to search Active
Directory for a user with that DisplayName. If you don't
use ADO, you will have to search similar to the code I
submitted in your other thread, unless someone comes up
with a better idea. Also, I suspect that duplicate
DisplayName's are allowed.

Quote:>-----Original Message-----
>I am trying to get an object when I know its displayname
and the container
>it is in.

>I would like to use LDAP provider if possible.

>Thanks

>.


 
 
 

1. Using VB GetObject using a specified security context?

Hi

I am using the GetObject function in a VBScript to create a new user in an
AD with the security context of a domain admin. This works fine from a
domain member server, but what I would like to do is run it from a stand
alone server and run the script with a specified security context ( a
specific user account on the domain ). MSDN specifies that the GetObject
function can "explicitly specify the credentials" but in the examples given
does not cover this method of authentication.

Any Ideas

Thanks

2. search utility

3. search using adodb

4. Page file and swap file

5. Once again User Inits....this time using ADODB

6. Why I love my O2!

7. LDAP Search using ADSI and VBScript -> ADODB Error

8. Test is ok every time but still get burn errors

9. What if GetObject cannot be used with domain name ?

10. bind to AD using getObject

11. calling GetObject using GUID with SiteServer

12. using getobject to refer to local computer

13. Adsi - error using getobject(LDAP: etc.)