1

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

Maxim
  • 83
  • 6
  • Well your not querying the GAL at the moment just the local Contacts folder eg . What are you trying to achieve ? I wouldn't use FindPeople to query the local contacts folder as FindItems will generally do a better job of this. I would suspect that there is differences between 2013 and 2016 to match the feature uplift in OWA. – Glen Scales Mar 22 '18 at 22:10
  • Glen, thanks for the comment. I have updated the start of the post with the goal description. – Maxim Mar 25 '18 at 11:19
  • I can rewrite local contacts search using FindItems/GetItem as you suggested but I would like to try to save the unified GAL/local contacts access using FindPeople. Is their any chance for it? I mean does the response which I desribed clearly state that the operation is not supported? – Maxim Mar 25 '18 at 11:19
  • FindPeople and GetPersona do different things if you want to search the GAL with FindPeople then use . GetPersona aggregates information from multiple sources so may return information from the local Contact and GAL but FindPeople still only searches based on the source you enter. It sounds like your confusing these two, if you want to search both the directory and the contact you need to make two requests. – Glen Scales Mar 25 '18 at 23:11
  • I do the following. First I make FindPeople query to "directory", then make FindPeople query with the same search filter to "contacts". And then I combine search results from both queries into one list and send GetPersona for all its items. That is what I meant by aggregated results from two search sources. – Maxim Mar 26 '18 at 04:34
  • Well the XML you posted doesn't show that, one suggestion i have is that you look at what OWA does as this is where FindPeople is used so just use the Browser tools to look what happens with the request when you search either locally or of the directory – Glen Scales Mar 26 '18 at 04:34
  • Eventually decided to use 'FindItems' according to your initial suggestion. Thank you very much for the help. – Maxim Mar 30 '18 at 09:17

0 Answers0