Exchange 2013上的“FindPeople”EWS查询

时间:2018-03-21 10:41:43

标签: search soap exchange-server exchangewebservices exchange-server-2013

我的目标是使用GivenName / Surname过滤器在GAL和用户的本地联系人中进行搜索 然后将汇总的搜索结果与一些联系人详细信息一起返回给用户 (联系电话等)。

Exchange 2013和Exchange 2016都需要支持它。

根据Microsoft文档,FindPeople似乎从2013年开始支持 GAL和用户的本地联系人。 因此,对两个目录的请求都是使用相同的EWS API实现的 - FindPeople / GetPersona。

但我遇到了以下问题。

在Exchange 2016上使用“FindPeople”EWS查询时,搜索可以正常用于GAL和个人目录。

但在Exchange 2013上使用“FindPeople”时:

  • 搜索适用于GAL;

  • 但个人目录失败 - 服务器返回200 OK,空结果列表:

    <FindPeopleResponse ResponseClass="Success" xmlns="http://schemas.microsoft.com/exchange/services/2006/messages>
        <ResponseCode>NoError</ResponseCode>
        <People/>
        <TotalNumberOfPeopleInView>0</TotalNumberOfPeopleInView
        <FirstMatchingRowIndex>0</FirstMatchingRowIndex
        <FirstLoadedRowIndex>0</FirstLoadedRowIndex>
    </FindPeopleResponse>
    

虽然个人目录中的项目与搜索过滤器匹配。

问题:

1)所有Exchange 2013版本是否支持个人目录搜索? 或者可能需要在较旧的Exchange 2013版本上安装某些补丁或服务包?

2)是否应在Exchange Server 2013上进行某些配置以允许使用EWS API在个人目录中进行搜索?

3)如果没有什么特别需要支持的话,一切都应该适用于任何Exchange 2013, 是否有解决此问题的好方法?

尝试按照以下方式检查EWS日志:

https://ingogegenwarth.wordpress.com/2017/01/12/troubleshooting-exchange-with-logparser-ews-logs/

但似乎没有太多额外的信息 - 只有服务器返回200 OK。

更新

用于FindPeople的确切查询是:

<?xml version=\"1.0\" encoding=\"utf-8\"?>
<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
               xmlns:m=\"http://schemas.microsoft.com/exchange/services/2006/messages\"
               xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\"
               xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">
<soap:Header>
    <t:RequestServerVersion Version="Exchange2013" />
</soap:Header>
<soap:Body>
    <m:FindPeople>
        <m:PersonaShape>
            <t:BaseShape>IdOnly</t:BaseShape>
            <t:AdditionalProperties>
                <t:FieldURI FieldURI="persona:DisplayName"/>
                <t:FieldURI FieldURI="persona:Surname"/>
                <t:FieldURI FieldURI="persona:GivenName"/>
            </t:AdditionalProperties>
        </m:PersonaShape>
        <m:IndexedPageItemView BasePoint="Beginning" MaxEntriesReturned="100" Offset="0"/>
        <m:ParentFolderId>
            <t:DistinguishedFolderId Id="contacts"/>
        </m:ParentFolderId>
        <m:QueryString>meo</m:QueryString>
    </m:FindPeople>
</soap:Body>
</soap:Envelope>

提前致谢

0 个答案:

没有答案