Mladen Prajdić Blog

Blog about stuff and things and stuff. Mostly about SQL server and .Net

Exchange: Accept and Cancel Meeting Request with WebDav

In a lengthy article about WebDAV  i've written a long while ago I've explained how and what WebDAV is and what are the problems you might encounter.

Suggesting by the comments (over 200) it's a pretty popular topic but there's no help on the net for anything more complex than simple operations because

MSDN suggest that WebDAV is totally unsupported. So anything you do with it you're on your own.

Having said that let's see how to do those 2 things from the title:

 

Cancel a Meeting Request

 1. get the Meeting Request URI from the inbox

 2. get the associated appointment for that Meeting Request

          explained how in previous article under     

               Development problems and bugs - 3. Getting associated appointment from a meeting request reply

 3. modify (PROPPATCH) it with the setting the appointments stampdate to now

 4. modify (PROPPATCH) the appointment like this (change the dtstamp property to now):

<?xml version=\"1.0\" ?>
<a:propertyupdate 
        xmlns:a=\"DAV:\" 
        xmlns:n0=\"http://schemas.microsoft.com/exchange/\" 
        xmlns:n1=\"urn:schemas:calendar:\">
    <a:set>
        <a:prop>
            <n0:outlookmessageclass>IPM.Schedule.Meeting.Canceled</n0:outlookmessageclass>
            <a:contentclass>urn:content-classes:calendarmessage</a:contentclass>
            <n1:dtstamp>2007-08-22T15:36:52.696Z</n1:dtstamp>
            <n1:method>CANCEL</n1:method>
        </a:prop>
    </a:set>
</a:propertyupdate>

 5. move the appointment to ##DavMailSubmissionURI##

 

Accept a Meeting Request

 1. get the meeting request URI from the inbox

 2. get it's from and to properties (FROM property will be set to TO, and TO property will be set to FROM in the reply)

 3. copy the meeting request to the Calendar folder (now you have 2 identical meeting requests - one in inbox and one in calendar)

 4. move the meeting request from inbox to drafts folder

 5. modify (PROPPATCH) the meeting request in the Calendar folder like this (change the dtstamp property to now):

<?xml version=\"1.0\" ?>
<a:propertyupdate 
        xmlns:a=\"DAV:\" 
        xmlns:n0=\"http://schemas.microsoft.com/exchange/\" 
        xmlns:n1=\"urn:schemas:calendar:\" 
        xmlns:n2=\"http://schemas.microsoft.com/mapi/\" >
    <a:set>
        <a:prop>
            <n0:outlookmessageclass>IPM.Appointment</n0:outlookmessageclass>
            <a:contentclass>urn:content-classes:appointment</a:contentclass>
            <n1:dtstamp>2007-08-22T16:14:30.492Z</n1:dtstamp>
            <n1:meetingstatus>CONFIRMED</n1:meetingstatus>
            <n1:method>REQUEST</n1:method>
            <n2:responsestatus>3</n2:responsestatus>
        </a:prop>
    </a:set>
</a:propertyupdate>

  6. modify (PROPPATCH) the meeting request in the Drafts folder like this (change the dtstamp property to now):

<?xml version=\"1.0\" ?>
<a:propertyupdate 
        xmlns:a=\"DAV:\" 
        xmlns:n0=\"http://schemas.microsoft.com/exchange/\" 
        xmlns:n1=\"urn:schemas:calendar:\" 
        xmlns:n2=\"urn:schemas:httpmail:\" 
        xmlns:n3=\"urn:schemas:mailheader:\" 
        xmlns:n4=\"http://schemas.microsoft.com/mapi/\" >
    <a:set>
        <a:prop>
            <n0:outlookmessageclass>IPM.Schedule.Meeting.Resp.Pos</n0:outlookmessageclass>
            <a:contentclass>urn:content-classes:calendarmessage</a:contentclass>
            <n1:dtstamp>2007-08-22T16:18:07.532Z</n1:dtstamp>
            <n1:meetingstatus>CONFIRMED</n1:meetingstatus>
            <n1:method>REPLY</n1:method>
            <n2:subject>Accepted: yourOriginalSubjectHere</n2:subject>
            <n3:to>to_Email@this_is_the_from_property_value_of_the_received_meeting_request</n3:to>
            <n4:responsestatus>3</n4:responsestatus>
        </a:prop>
    </a:set>
</a:propertyupdate>

  7. move the item from Drafts to ##DavMailSubmissionURI##

 

 That should be it. Enjoy!

 

kick it on DotNetKicks.com
 

Legacy Comments


Mike Fagan
2008-01-09
re: Exchange: Accept and Cancel Meeting Request with WebDav
I am trying to use .NET, c# and webdav to create appointments and send meeting requests from my ASP 2.0 web application when people pick a class to attend. I have tried many different things and have been partially successful. I would love to send you my code I have for you to look over, or if you could send me a sample on how to do that I would appreciate it alot! Thanks in advance for your help!

Mladen
2008-01-09
re: Exchange: Accept and Cancel Meeting Request with WebDav
what are you having problems with exactly?

Eli
2008-09-12
re: Exchange: Accept and Cancel Meeting Request with WebDav
Tried to follow you accept meeting request guide, it failed at the 3 step and caused the Calendar to disapear from OWA!,
The only thing that resolved it was deleting the user and creating it empty.
(it wasn't a disaster since I did it on a test user).
can you please send a complete http sniff of the accept operation, it would be helpful if you can do the same for the cancel.

Thanks,
Eli

vasarla
2008-10-15
Accept Meeting Request with WebDav
Accept a Meeting Request is working fine in my case , but if the organizer updates a meeting request and sends the updates to the attendees. And attendee accept the request it is creating a new meeting request in the calendar it is not updating earlier present calendar event.Is there any tag which sync between the calendar message in inbox and the appointment in the calendar.

Mladen
2008-10-15
re: Exchange: Accept and Cancel Meeting Request with WebDav
no idea.

vasarla
2008-10-21
re: Exchange: Accept and Cancel Meeting Request with WebDav
when i accept the recurring Meeting request, i am not able to see the recurrence instances updated in the OWA.
But after opening the sent item response request http://sever/exchange/user//Sent%20Items/xxxx.eml the OWA calendar is updated with recurrence.Is there any other tag i need to set so that the recurrences are updated in the OWA.

vasarla
2008-10-22
re: Exchange: Accept and Cancel Meeting Request with WebDav
There is small correction in the Accept request to be able to work with recurrencent instances.

3. copy the meeting request to the Calendar folder (now you have 2 identical meeting requests - one in inbox and one in calendar)

3. copy the meeting request to the inbox folder with another guid string (now you have 2 identical meeting requests in inbox )

4.step is same as above

4.modify (PROPPATCH) the meeting request with new guidstring.eml like this (change the dtstamp property to now): as shown above
5.Move the modified inbox item to calendar.


it will updated all the recurrences in the calendar.


Mladen
2008-10-22
re: Exchange: Accept and Cancel Meeting Request with WebDav
cool! thanx vasarla.