Locate objects in Active Directory

Greetings,

I’m having a bit of a tool gap because I can’t quite figure out where to go here… here’s what I want to do.

I have a list with the OU names, very straightforward. And what I need to do is, use that list to find all the users that are in those UOs. Now here’s the issue, the AD is very big and I have pinned down where all the users I need are but there are still a lot of branches and I can’t tell where they are.

Is there a way that ansible can locate these UOs?

Greetings,

I’m having a bit of a tool gap because I can’t quite figure out where to go here… here’s what I want to do.

I have a list with the OU names, very straightforward. And what I need to do is, use that list to find all the users that are in those UOs. Now here’s the issue, the AD is very big and I have pinned down where all the users I need are but there are still a lot of branches and I can’t tell where they are.

Is there a way that ansible can locate these UOs?

No. You need to tune the exact ldap query that will get the desired results (for instance with ldapquery) and then you can use
https://docs.ansible.com/ansible/latest/collections/community/general/ldap_search_module.html to use that in ansible.