Hello
I created a code via VB6 which allows me to search for a user in active directroy and then displays the users details that i require:
Assuming this is the hierarchical structure of Active Directory:
Root - First level - Second Level - Third Level
Dim user as IADsuser
"LDAP://CN=" + User + ",OU=Second Level,OU=First Level,DC=domain,DC=co,DC=uk"
lbluser.Caption = user.Get("Department")
' Displays the department the user is in.
(NOTE: Above LDAP is broken into two parts first ("LDAP://CN=") + User + is using the text entered in a textbox to serach for and the the second half of the LDAP code comes along)
This works fine when searching for any user under the second level (second level as displayed in active directory)
but users that are found in any other directory are not displayed. I have added subtree at the end of the LDAP query and still makes no difference. I would like to know how to search all of active directory so any user regardless of what level theyre in woudl display their information.
If you have any questions please ask and thank you in advance for any help given.
I created a code via VB6 which allows me to search for a user in active directroy and then displays the users details that i require:
Assuming this is the hierarchical structure of Active Directory:
Root - First level - Second Level - Third Level
Dim user as IADsuser
"LDAP://CN=" + User + ",OU=Second Level,OU=First Level,DC=domain,DC=co,DC=uk"
lbluser.Caption = user.Get("Department")
' Displays the department the user is in.
(NOTE: Above LDAP is broken into two parts first ("LDAP://CN=") + User + is using the text entered in a textbox to serach for and the the second half of the LDAP code comes along)
This works fine when searching for any user under the second level (second level as displayed in active directory)
but users that are found in any other directory are not displayed. I have added subtree at the end of the LDAP query and still makes no difference. I would like to know how to search all of active directory so any user regardless of what level theyre in woudl display their information.
If you have any questions please ask and thank you in advance for any help given.