PrincipalSearcher.FindOne Method
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.
Returns a principal search result that contains the first principal object found that matches the principal specified in the QueryFilter property.
public:
System::DirectoryServices::AccountManagement::Principal ^ FindOne();
public System.DirectoryServices.AccountManagement.Principal FindOne ();
[System.Security.SecurityCritical]
public System.DirectoryServices.AccountManagement.Principal FindOne ();
member this.FindOne : unit -> System.DirectoryServices.AccountManagement.Principal
[<System.Security.SecurityCritical>]
member this.FindOne : unit -> System.DirectoryServices.AccountManagement.Principal
Public Function FindOne () As Principal
Returns
A Principal object that contains the principal object that matches the query filter or null
if no results are found.
- Attributes
Exceptions
The QueryFilter contains referential properties. For more information, see the Query by Example overview topic.
The QueryFilter is a persisted principal.
A QueryFilter must first be assigned to the principal searcher before the query can be performed.
Remarks
If there is exactly one match of the object specified in the QueryFilter, this method returns that object. If there are multiple matches of the QueryFilter object, this method arbitrarily returns one of the matching principals.
The Principal object returned from this method matches 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.
Applies to
See also
Tilbakemeldinger
https://aka.ms/ContentUserFeedback.
Kommer snart: Gjennom 2024 faser vi ut GitHub Issues som tilbakemeldingsmekanisme for innhold, og erstatter det med et nytt system for tilbakemeldinger. Hvis du vil ha mer informasjon, kan du se:Send inn og vis tilbakemelding for