Quantcast
Channel: Directory Services forum
Viewing all articles
Browse latest Browse all 31638

Set of Permissions required to read the trust directions between domains

$
0
0

I am using the Domains.GetAllTrustRelationships() method to read the trust info .My current setup has a one way trust with the domain in other forest.But for some reason when i execute the the Domains.GetAllTrustRelationShips method with Network service account ,I get the trust direction as Bidirectional.SO i suspect that the Bidirectional Trust is returned because the current user is not having sufficient rights in active directory to read this value and maybe returning null .

And if this is the case then the below code from TrustRelationshipInformation class of System.DirectoryServices.ActiveDirectory assembly will return Bidirectional trust

internal TrustRelationshipInformation(DirectoryContext context, string source, TrustObject obj)
    {
      this.context = context;
      this.source = source;
      this.target = obj.DnsDomainName == null ? obj.NetbiosDomainName : obj.DnsDomainName;
      if ((obj.Flags & 2) != 0 && (obj.Flags & 32) != 0)
        this.direction = TrustDirection.Bidirectional;
      else if ((obj.Flags & 2) != 0)
        this.direction = TrustDirection.Outbound;
      else if ((obj.Flags & 32) != 0)
        this.direction = TrustDirection.Inbound;
      this.type = obj.TrustType;
    }

So can i get the set of permissions required in active directory for a user such that it is able to read the trust info


Viewing all articles
Browse latest Browse all 31638

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>