My goal is to make a search in both GAL and user's local contacts using GivenName/Surname filter and then return to the user the aggregated search results together with some contact details (contact phone numbers and etc).
It needs to be supported for both Exchange 2013 and Exchange 2016.
According to Microsoft documentation FindPeople seemed to be supported starting 2013 and for both GAL and user's local contacts. So the request for both directories was implemented using same EWS API - FindPeople/GetPersona.
But I've faced with the following issue.
When using "FindPeople" EWS query on Exchange 2016, search works correctly for both GAL and Personal Directory.
But when using "FindPeople" on Exchange 2013:
search works correctly for GAL;
but fails for Personal Directory - server returns 200 OK with empty results list:
<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>
though there are items in Personal Directory matching the search filter.
Questions:
1) Is Personal Directory search is supported on all Exchange 2013 builds? Or maybe some patch or service pack needs to be installed on older Exchange 2013 builds?
2) Should some configuration be done on Exchange Server 2013 to allow search in Personal Directory using EWS API?
3) If nothing special needs to be done for support and everything should work on any Exchange 2013, is there a good way for troubleshooting this issue?
Tried checking EWS logs according to:
https://ingogegenwarth.wordpress.com/2017/01/12/troubleshooting-exchange-with-logparser-ews-logs/
But seems there is not much additional info in them - only that the server returns 200 OK.
Update:
The exact query used for FindPeople is:
<?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>
Thanks in advance