views:

319

answers:

1

I have a PHP application which connects to Microsoft Exchange server to retrieve 'Contacts' via WebDAV.

Is there a WebDAV query I can issue to Microsoft Exchange to get only contacts that have been changed or added within the last X days?

It'd be a bit easier to deal with than querying for all 30 bajillion contacts every time and doing the check/update/insert thing for every record.

+1  A: 

You might want to check out the excellent examples at this website. http://www.troywolf.com/articles/php/exchange%5Fwebdav%5Fexamples.php. They're great reference on how to access Exchange via WebDAV using PHP. He even has one on searching for contacts, http://www.troywolf.com/articles/php/exchange%5Fwebdav%5Fexamples.php#search%5Fcontacts, but doesn't mention the exact field that contains the field you're interested in constraining on, so I'll help you out.

Searching the Exchange store (http://msdn.microsoft.com/en-us/library/aa123573%28EXCHG.65%29.aspx) is a great starting place. What you're looking for specifically is Specify a Date range http://msdn.microsoft.com/en-us/library/aa123600%28EXCHG.65%29.aspx which spells out the syntax for using the dav:creationdate field.

There's more information on the DAV namespace here http://msdn.microsoft.com/en-us/library/aa565717.aspx as well.

Good luck!

JJS
Thanks JJS! That was exactly what I needed! Microsoft documentation is such a pain to search through sometimes!
Keith Palmer