Using PB2017 and 2019. I will have the user id and top level OU. I am able to get the AD User object if I know the 2 sub level OU's, but the problem is, not every user is in the same sub level. Currently using similar to this:
Oleobject l_oleuser
l_oleuser.ConnectToObject("LDAP://CN=myusername,OU=Users,OU=Level3,OU=Level2,OU=Corporate,DC=Mydomain,DC=COM"
This works great when I know Level2 and Level3, but since users can be in different Level2 and Level3 OU's, I don't get the user if they are in something other than the values I know for my Level2 and Level3. The final OU is always Users. How do I search for all Level2 and Level3 values?
Thanks,
Kevin