Hi Guys,
I am running into an issue where PrincipalContext fails to find the identity of an user from a trusted domain.
I have two domains which has 1 way trust between them , lets say ABC.XYZ.net and XYZ.net.
Setup:
We have an apache service running as Network Service. This apache service uses PrincipalConext to find an user in the domain. The user can be from ABC.XYZ.net or XYZ.net. When the machine on which the service runs is connected to ABC.XYZ.net, UserPrincipal.FindByIdentity is able to find the user from the same domain, but fails to find an user from XYZ.net domain. Please Note- there is trust established between two domains, where an user from XYZ.net is bale to login to machine in ABC.XYZ.net
We have tried the below constructors of PrincipalContext but nothing worked.
PrincipalContext context = new PrincipalContext(ContextType.Domain);
PrincipalContext context = new PrincipalContext(ContextType.Domain, "XYZ.net");
We don't have a way to use any user credential to use ValidateCredential api. The intention is to check if the given username is present in any of the two domains.