none
EWS - Check whether a contact exists RRS feed

  • Question

  • I am using Intapp to interact with Exchange Web Services, so I do not use the API. I just need the SOAP request to perform actions. I use the request below to find the ID of the folder containing the contacts, but not sure how to perform the next step which is to see if that contact already exists, so I can either use CreateItem or UpdateItem. Anyone have any idea how I would modify the request below to use FindItem to look at the contacts and the email field?

    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
      <soap:Header>
    <t:RequestServerVersion Version="Exchange2010"/>
      <t:ExchangeImpersonation>
       <t:ConnectingSID>
        <t:PrimarySmtpAddress>myemail@mydomain.com</t:PrimarySmtpAddress>
       </t:ConnectingSID>
      </t:ExchangeImpersonation>
     </soap:Header>
     <soap:Body>
      <FindFolder Traversal="Shallow" xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
       <FolderShape>
        <t:BaseShape>Default</t:BaseShape>
       </FolderShape>
    	<Restriction>
    	  <t:Contains ContainmentMode="ExactPhrase" ContainmentComparison="Exact">
    		 <t:FieldURI FieldURI="folder:DisplayName" />
    		 <t:Constant Value="Firm Contact List" />
    	  </t:Contains>
    	</Restriction>   
       <ParentFolderIds>
        <t:FolderId Id="AQEuAAADGkRzkKpmEc2byACqAC/EWgMAItRlOWfowEWmzxze09a4vgAAAeO+vAAAAA=="/>
       </ParentFolderIds>
      </FindFolder>
     </soap:Body>
    </soap:Envelope>
    



    Tuesday, August 16, 2011 2:30 PM

All replies

  • Hi,

    the next step is to execute a FindItem request (http://msdn.microsoft.com/en-us/library/aa566107%28v=exchg.140%29.aspx) using the FolderId returned by your FindFolder operation as the ParentFolderId.

    A good way to construct the soap requests is to use the Exchange Managed API in a C# application. Enable tracing, execute your request and view the output on the console session. You can then use that request in your Intapp application.

    Kind regards,

    Henning

    Tuesday, August 16, 2011 3:55 PM