I'm trying to make an LDAP query for get all the user member of a group. The problem is that this group is populated with user from multiple AD domains and I've to get all the members user with a singe query.
According to this page I can reach my goal by querying the Global Catalog.
ldapsearch -x -W -H "ldap://mydomain.local:3268" -D "CN=myuser,OU=Applicative Users,OU=Users,OU=myou,DC=mydomain,DC=local" -b " " '(&(objectclass=user)(memberof=CN=mygroup,OU=Groups,OU=myou,DC=mydomain,DC=local))
This query return only the users member of "mygroup" that resides on the domain "mydomain"
No info are retrieved for the users that come from trusted domains.
How can I do that?