0

We have two domains with one-way trust.

Domain EXT that has External one-way trust configured to domain INT. So I would like to connect to EXT domain by using EXT domain user credentials and search for users that are in INT domain.

The question - Is it possible by using default API like?:

var found = UserPrincipal.FindByIdentity(context, 
    IdentityType.SamAccountName, 'a.someone');

Where 'a.someone' is SamAccountName for user from INT domain.

Where 'context' initialized like the following:

var contextOptions = ContextOptions.Negotiate | 
ContextOptions.Signing | ContextOptions.Sealing;

var context = new PrincipalContext(ContextType.Domain, "EXT.loc", 
null, contextOptions, "EXT\\Administrator", "password");
AlexNI
  • 1
  • 2

1 Answers1

1

Here is a thread about AD search. PrincipalContext is not bad, easy-to-use in few situation, but not complete enough.

Concerning authentication, it depends of the execution environment. Someone asked for this point here.

I hope that helped.

Community
  • 1
  • 1
Nate B.
  • 942
  • 11
  • 31
  • Thanks for hint. I tried examples from links above but with no luck yet. Looks like it wont work in the way I want. – AlexNI Aug 31 '12 at 16:33
  • Can you edit your post with your updated code and the complete processes you made since your first post ? – Nate B. Sep 03 '12 at 06:36