Re: How do I locate an object using its sid in a multi-forests env

If I have a external forest trust for my current forest, would I get all the
domains ,including those domains, in the external forest if I use the


"Joe Kaplan" wrote:

Are you sure the trust isn't a domain trust instead of a forest trust? Try
the same code on your domains in your forest to see if the trust shows up

Joe K.
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
"Pucca" <Pucca@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
I tried using the follow code to get the trusted relationship for my forest
but it returns 0 for trusts.Count. I do have external trust for my
forest. Why isn't it catching that information?
Thank you.
Forest forest;
forest = Forest.GetCurrentForest();
TrustRelationshipInformationCollection trusts =
for(int indx=0; indx<trusts.Count; indx++)
TrustRelationshipInformation trust = trusts[indx];

"Pucca" wrote:

Hi, I'm using vs2005, .net2 for a windows applicaiton. I need to bind to
AD object (user, group or computer) and I only have its sid. This object
could locate in a domain outside of my current forest, in a
1. How can I find the path to this object?
2. How to find the domain name that this object is located.
3. If this object is not in current forest, then, how can I verify if
forest/domain that this object is at has a valid external trust
with my current forest?

Any help in any of the above issue is greatly appreciated.

Thank you.


Relevant Pages

  • Re: creating one way trust
    ... of different forest. ... It sounds for me that you do not need/have a trust, ... Once everything is replicated from the win2k svr. ... Let me try to understan a little more about youre network. ...
  • Re: Huge AD deployment
    ... That was the case in Windows 2000, but in Windows Server 2003 forest trusts ... note though is that a forest trust is only transitive for domains within the ... >> in that data center and have every country trust ... instead of going over the internet. ...
  • Re: Domain Functional Levels and Trusts
    ... other type of trust, i.e., Forest Trust ... A Forest Trust and an External trust are TWO DISTINCT types ... FORESTS to be in Win2003 Forest Functional Level. ... External trusts are possible in any MODE, ...
  • RE: Two way forest trust fails only in one direction
    ... After deep research of the SMB signing, we saw that both servers need Reg Key: ... needed to match on both servers on both sides of the trust. ... B's Forest, but Company B can not access Company As forest at all. ... running DNS and WINS under Windows Active Directory. ...
  • Re: Raise "Forest" functional level & rename domain?
    ... When two forests are both at 2003 forest functional level you have two trust ... Cross-forest trusts have some benefits over standard domain trusts (e.g ... selective authentication, transitive across all domains in the forest, etc.). ...