spws
Version:
SharePoint Web Services Wrapper
23 lines (22 loc) • 1.18 kB
TypeScript
import { SpwsResponse, PrincipalType, PrincipalInfo } from "../../types";
interface Operation extends SpwsResponse {
data: PrincipalInfo[];
}
/**
* Returns an array of PrincipalInfo objects from the SPUserCollection for the Web site. All instances have the principal logon name specified in searchText. Only the maxResults objects can be added to the array.
* @link https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-services/ms774790(v=office.12)
* @param searchText Principal logon name.
* @param maxResults Unless otherwise specified, the maximum number of principals that can be returned from a provider is 10.
* @param principalType SPPrincipalType object that specifies user scope and other information.
* @example
* ```
* const res = await searchPrincipals("dev\john.smith", "Site Owners")
* ```
*/
declare const searchPrincipals: (searchText: string, { webURL, maxResults, principalType, }?: {
/** The SharePoint webURL */
webURL?: string | undefined;
maxResults?: number | undefined;
principalType?: PrincipalType | undefined;
}) => Promise<Operation>;
export default searchPrincipals;