Rest 如何将特定sharepoint组中的人员提取到sharepoint Online中的ClientPeoplePicker?

Rest 如何将特定sharepoint组中的人员提取到sharepoint Online中的ClientPeoplePicker?,rest,sharepoint-online,peoplepicker,Rest,Sharepoint Online,Peoplepicker,我试过使用ClientPeoplePickerSearchUser。有人能帮我吗?我遵循了以下链接:您需要在代码中设置“SharePointGroupID”属性,以限制在客户端人员选择器中搜索特定SharePoint组中的人员 function search(request,response) { var appweburl = decodeURIComponent(getQueryStringParameter('SPAppWebUrl')); var hostweburl =

我试过使用ClientPeoplePickerSearchUser。有人能帮我吗?我遵循了以下链接:

您需要在代码中设置“SharePointGroupID”属性,以限制在客户端人员选择器中搜索特定SharePoint组中的人员

function search(request,response) {
    var appweburl = decodeURIComponent(getQueryStringParameter('SPAppWebUrl'));
    var hostweburl = decodeURIComponent(getQueryStringParameter('SPHostUrl'));
    var restSource = appweburl + "/_api/SP.UI.ApplicationPages.ClientPeoplePickerWebServiceInterface.clientPeoplePickerSearchUser";
    var principalType = this.element[0].getAttribute('principalType');
    $.ajax( 
    {
        'url':restSource,
        'method':'POST',
        'data':JSON.stringify({
            'queryParams':{
                '__metadata':{
                    'type':'SP.UI.ApplicationPages.ClientPeoplePickerQueryParameters'
                },
                'AllowEmailAddresses':true,
                'AllowMultipleEntities':false,
                'AllUrlZones':false,
                'MaximumEntitySuggestions':50,
                'PrincipalSource':15,
                'PrincipalType': principalType,
                'QueryString':request.term
                //'Required':false,
                'SharePointGroupID':23,
                //'UrlZone':null,
                //'UrlZoneSpecified':false,
                //'Web':null,
                //'WebApplicationID':null
            }
        }),
        'headers':{
            'accept':'application/json;odata=verbose',
            'content-type':'application/json;odata=verbose',
            'X-RequestDigest':requestDigest
        },
        'success':function (data) { 
            var d = data;
            var results = JSON.parse(data.d.ClientPeoplePickerSearchUser);
            if (results.length > 0) {
                response($.map(results, function (item) {
                    return {label:item.DisplayText,value:item.DisplayText}
                }));
            }            
        },
        'error':function (err) { 
            alert(JSON.stringify(err)); 
        }
    }
  );
}

谢谢,我知道了。我还试图设置Web属性,这给了我一个错误