none
findItem query string not working properly in EWS RRS feed

  • Question

  • I am trying to find emails within my mailbox with subject:trump. My mailbox only has 2 emails and one email has subject trump. Query string is not working correct as the result returns both emails

    Request -

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:mes="http://schemas.microsoft.com/exchange/services/2006/messages"> <soapenv:Header> <typ:ExchangeImpersonation> <typ:ConnectingSID> <!--You have a CHOICE of the next 4 items at this level--> <typ:PrimarySmtpAddress>karan.shah@secops.com</typ:PrimarySmtpAddress> </typ:ConnectingSID> </typ:ExchangeImpersonation> <typ:RequestServerVersion Version="Exchange2013_SP1"/> </soapenv:Header> <soapenv:Body> <mes:FindItem Traversal="Shallow"> <mes:ItemShape> <typ:BaseShape>Default</typ:BaseShape> <typ:BodyType>HTML</typ:BodyType> <typ:AdditionalProperties> <typ:FieldURI FieldURI="item:Subject"/> </typ:AdditionalProperties> </mes:ItemShape> <mes:ParentFolderIds> <typ:DistinguishedFolderId Id="inbox"> </typ:DistinguishedFolderId> </mes:ParentFolderIds> </mes:FindItem> <mes:QueryString>Subject:trump</mes:QueryString> </soapenv:Body> </soapenv:Envelope>

    Response

    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
       <s:Header>
          <h:ServerVersionInfo MajorVersion="15" MinorVersion="0" MajorBuildNumber="847" MinorBuildNumber="31" Version="V2_8" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
       </s:Header>
       <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
          <m:FindItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
             <m:ResponseMessages>
                <m:FindItemResponseMessage ResponseClass="Success">
                   <m:ResponseCode>NoError</m:ResponseCode>
                   <m:RootFolder TotalItemsInView="2" IncludesLastItemInRange="true">
                      <t:Items>
                         <t:Message>
                            <t:ItemId Id="AAMkAGY1NzU0NWY1LTY1ZWUtNGFlZi04NTIzLWE4NzczMTA3MTBlOABGAAAAAACT82M59ReyRqmR00H6iRzgBwARNi25d83jR5LtBXEJVv7uAAAAAAENAAARNi25d83jR5LtBXEJVv7uAAADZ+llAAA=" ChangeKey="CQAAABYAAAARNi25d83jR5LtBXEJVv7uAAADZ9/d"/>
                            <t:Subject>trump</t:Subject>
                            <t:Sensitivity>Normal</t:Sensitivity>
                            <t:Size>9981</t:Size>
                            <t:DateTimeSent>2018-01-04T18:56:16Z</t:DateTimeSent>
                            <t:DateTimeCreated>2018-01-04T18:56:20Z</t:DateTimeCreated>
                            <t:HasAttachments>false</t:HasAttachments>
                            <t:IsAssociated>false</t:IsAssociated>
                            <t:From>
                               <t:Mailbox>
                                  <t:Name>Administrator</t:Name>
                                  <t:EmailAddress>/O=SECOPSENG/OU=EXCHANGE ADMINISTRATIVE GROUP (FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=CC48D2BEFA0F4794B2EEA515C5C98FBF-ADMINISTRATOR</t:EmailAddress>
                                  <t:RoutingType>EX</t:RoutingType>
                                  <t:MailboxType>OneOff</t:MailboxType>
                               </t:Mailbox>
                            </t:From>
                            <t:IsRead>true</t:IsRead>
                         </t:Message>
                         <t:Message>
                            <t:ItemId Id="AAMkAGY1NzU0NWY1LTY1ZWUtNGFlZi04NTIzLWE4NzczMTA3MTBlOABGAAAAAACT82M59ReyRqmR00H6iRzgBwARNi25d83jR5LtBXEJVv7uAAAAAAENAAARNi25d83jR5LtBXEJVv7uAAAAAAElAAA=" ChangeKey="FwAAABYAAAARNi25d83jR5LtBXEJVv7uAAAAAACM"/>
                            <t:Subject>Undeliverable: [Outlook Web App Junk Mail Report] now</t:Subject>
                            <t:Sensitivity>Normal</t:Sensitivity>
                            <t:Size>32364</t:Size>
                            <t:DateTimeSent>2017-12-16T17:35:54Z</t:DateTimeSent>
                            <t:DateTimeCreated>2017-12-16T17:35:55Z</t:DateTimeCreated>
                            <t:HasAttachments>false</t:HasAttachments>
                            <t:IsAssociated>false</t:IsAssociated>
                            <t:From>
                               <t:Mailbox>
                                  <t:Name>Microsoft Outlook</t:Name>
                                  <t:EmailAddress>/O=SECOPSENG/OU=EXCHANGE ADMINISTRATIVE GROUP (FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=MICROSOFTEXCHANGE329E71EC88AE4615BBC36AB6CE41109E</t:EmailAddress>
                                  <t:RoutingType>EX</t:RoutingType>
                                  <t:MailboxType>OneOff</t:MailboxType>
                               </t:Mailbox>
                            </t:From>
                            <t:IsRead>true</t:IsRead>
                         </t:Message>
                      </t:Items>
                   </m:RootFolder>
                </m:FindItemResponseMessage>
             </m:ResponseMessages>
          </m:FindItemResponse>
       </s:Body>
    </s:Envelope>

    • Moved by Bill_Stewart Wednesday, February 14, 2018 7:27 PM Unanswerable drive-by question
    Friday, January 5, 2018 2:34 AM