People.SearchPrincipals Method
[SoapDocumentMethodAttribute("http://schemas.microsoft.com/sharepoint/soap/SearchPrincipals", RequestNamespace="http://schemas.microsoft.com/sharepoint/soap/", ResponseNamespace="http://schemas.microsoft.com/sharepoint/soap/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)] public PrincipalInfo[] SearchPrincipals ( string searchText, int maxResults, SPPrincipalType principalType )
Parameters
- searchText
Principal logon name.
- maxResults
Unless otherwise specified, the maximum number of principals that can be returned from a provider is 10.
- principalType
SPPrincipalType object that specifies user scope and other information.
Return Value
A list of PrincipalInfo objects that is indexed and accessed by principal logon name.A user may have more than one type of authorization access within a Web site. A user may be part of a Windows SharePoint Services group and a distribution list, in addition to having Web site access that is authorized by their logon name. Consequently, there may be multiple copies of the same user identifier (ID) that is associated with a specific Web site.
A subset of user information is compiled from provider sources and security scopes that are associated with a Web site. This subset of the SPUserCollection for the Web site is searched for all occurrences that contain the logon name specified in the searchText parameter that are of the specified principal type. If the logon name and principal pair is found within the subset, then the appropriate fields within the row are copied from the subset to the array that is returned to the calling module. If the login name and principal type pair does not exist within the subset of the SPUserCollection, it cannot be added to the array.
Only the maxResults rows can be returned to the calling module.