Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

PrincipalSearcher.FindAll Method

Returns a principal search result that contains a collection of all the principal objects that match the principal specified in the query filter property.

Namespace:  System.DirectoryServices.AccountManagement
Assembly:  System.DirectoryServices.AccountManagement (in System.DirectoryServices.AccountManagement.dll)

public PrincipalSearchResult<Principal> FindAll()

Return Value

Type: System.DirectoryServices.AccountManagement.PrincipalSearchResult<Principal>
A [T:System.DirectoryServices.AccountManagement.PrincipalSearchResult'1] object that matches the query filter or an empty collection if no results are found.

ExceptionCondition
InvalidOperationException

The QueryFilter contains referential properties. For more information, see the Query by Example overview topic.

The QueryFilter is a persisted principal.

ArgumentException

A QueryFilter must first be assigned to the principal searcher before the query can be performed.

The principal objects returned in the principal search result match the type of object contained in the QueryFilter property. The search is conducted in the context specified in the Context property. For more information, see the Query by Example overview topic.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4
Show:
© 2015 Microsoft