문제

I have email id of the members and I am executing following quesy

The command text is

 UserDomain = VBA.Environ("UserDomain")

 cmd.CommandText = "SELECT cn, mail, c  FROM 'LDAP://" & UserDomain & "' WHERE mail = 'r.khenat@abc.com'"

Above code works well on my machine for me and my teammates, however if I use the same code to get the details of the team mates who are in different domain, I get no information.

Instead of UserDomain, what root value I need to put so that I can get the required information.

Any idea?

도움이 되었습니까?

해결책 2

I managed to get it done by hard coding the domain names and adding it in an Array. I iterated through array to fetch the required details.

다른 팁

You can only ask a domain for users that belong to that domain, so the current domain you are querying will know nothing about e.g. my email, just as my domain will know nothing about your email.

You can try asking my domain about my email if you want, but you won't have any access to it. In the same way I can try asking your domain about its members but if I have access them your domain has been set up very very badly. Only a properly authorised member of a domain should be able to ask that domain such questions, and them only when logged onto a machine which is also a member of that same domain, and is also connected to it.

So no, the query you want to run will not work, by design.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top