0

I have a program that gets login information from Active Directory, I use an LDAP URL simular to this (to query mycompany.com):

LDAP://OU=MYCO,DC=MYCOMPANY,DC=COM

Is there a way to query mycompany.com and yourcompany.com (not in the same forest) using the same URL? Or do I have to rewrite the program to query them serially? (I am trying to avoid a rewrite.)

EDIT: As I suspected, I would have to query them seperately. Outside of the evil EE, I didn't find anything to confirm this. Thanks everyone.

4 Answers 4

2

No, you can't interrogate two different domains in the same LDAP query. You need to work around this programatically

0

EDIT: Misread question. I believe you'll have to query them sequentially.

0
0

You'll have to do them separately.

0

Assuming your domains are in the same AD forest, you'll want to query the global catalog to do a cross-domain query. Changing the query URI to GC:// instead of LDAP:// indicates you want to specifically do a global catalog query. LDAP will go straight to a domain controller of the specific domain which won't necessarily know anything about the other domains you are interested in.

GC://dc=domain,dc=com/....

Keep in mind, though, that the global catalog only has a subset of the attributes available in the AD schema so you might have to go out to the domains themselves anyway. Here's a list of AD global attributes.

Note that it doesn't look like the domains in your question would be in the same forest.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .