Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sharepoint online SearchExecutor(JSOM)未从Sharepoint online用户配置文件检索值_Sharepoint Online_Sharepoint Apps_Sharepoint Search_Sharepoint Jsom_Sharepoint Userprofile - Fatal编程技术网

Sharepoint online SearchExecutor(JSOM)未从Sharepoint online用户配置文件检索值

Sharepoint online SearchExecutor(JSOM)未从Sharepoint online用户配置文件检索值,sharepoint-online,sharepoint-apps,sharepoint-search,sharepoint-jsom,sharepoint-userprofile,Sharepoint Online,Sharepoint Apps,Sharepoint Search,Sharepoint Jsom,Sharepoint Userprofile,我正在尝试从SharePoint托管应用程序在SharePoint online用户配置文件中执行人员搜索,但它不返回任何数据 我使用以下代码来执行此操作: clientContext = new SP.ClientContext.get_current(); // Building Keyword query for the search var keywordQuery = new Microsoft.SharePoint.Client.Search.Query.KeywordQuery(

我正在尝试从SharePoint托管应用程序在SharePoint online用户配置文件中执行人员搜索,但它不返回任何数据

我使用以下代码来执行此操作:

clientContext = new SP.ClientContext.get_current();

// Building Keyword query for the search
var keywordQuery = new Microsoft.SharePoint.Client.Search.Query.KeywordQuery(clientContext);

keywordQuery.set_queryText("mohammed");
keywordQuery.set_sourceId("B09A7990-05EA-4AF9-81EF-EDFAB16C4E31");
keywordQuery.set_rowLimit(500);
keywordQuery.set_trimDuplicates(false);

var searchExecutor = new Microsoft.SharePoint.Client.Search.Query.SearchExecutor(clientContext);
results = searchExecutor.executeQuery(keywordQuery);

clientContext.executeQueryAsync(
            function () {
                alert(results.m_value);
            },
            function (err) {
                alert("Error");
            }
        );
我正在尝试搜索包含“mohammed”文本的用户配置文件

searchExecutor.executeQuery(关键字查询)
执行时没有任何错误,但
results.m\u value
返回0。如果我从
results.m_value
中获得值,那么我可以使用PeopleManager读取用户配置文件属性

注意:我已将用户命名为穆罕默德·阿里夫·坎努巴沙

任何人请提供建议,请提前感谢

试试这个

keywordQuery.set_queryText("mohammed*");