Domain.GetAllTrustRelationships Method (System.DirectoryServices.ActiveDirectory) By dotnet-bot Archived: 2026-04-02 10:49:52 UTC 1. .NET 2. API browser In this article 1. Definition 2. Applies to 3. See also Definition Important Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here. Retrieves all of the trust relationships for this domain. public System.DirectoryServices.ActiveDirectory.TrustRelationshipInformationCollection GetAllTrustRelationships Returns A TrustRelationshipInformationCollection object that contains all of the trust relationships for this domain. Exceptions A call to the underlying directory service resulted in an error. The target server is either busy or unavailable. The object has been disposed. The specified account does not have permission to perform this operation. Applies to https://docs.microsoft.com/en-us/dotnet/api/system.directoryservices.activedirectory.domain.getalltrustrelationships?redirectedfrom=MSDN&view=netframework-4.7.2#System_DirectoryServices_ActiveDirectory_Domain_GetAllTrustRelationships Page 1 of 2 Product Versions .NET 10 (package-provided), 11 (package-provided) .NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 .NET Standard 2.0 (package-provided) Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10, 11 See also TrustRelationshipInformationCollection Collaborate with us on GitHub The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. .NET feedback .NET is an open source project. Select a link to provide feedback: Feedback Source: https://docs.microsoft.com/en-us/dotnet/api/system.directoryservices.activedirectory.domain.getalltrustrelationships?redirectedfrom=M SDN&view=netframework-4.7.2#System_DirectoryServices_ActiveDirectory_Domain_GetAllTrustRelationships https://docs.microsoft.com/en-us/dotnet/api/system.directoryservices.activedirectory.domain.getalltrustrelationships?redirectedfrom=MSDN&view=netframework-4.7.2#System_DirectoryServices_ActiveDirectory_Domain_GetAllTrustRelationships Page 2 of 2