I am having a problem that has been reported here and elsewhere before: not being able to change the recurrence pattern on a master via EWS. In my case, I am still using the old proxy classes against E2010. I've not tried it with Managed API yet (I have to support both), but suspect I'll get the same result. The error FWIW is "Set action is invalid for property".
In a post here from 2008, Dave Stirling mentions that only the organizer should be able to do this. This is a problem for me because my server application uses a single, full-access id to manage all of the room resource calendars in an enterprise. With this user I can delete appointments on any calendar, regardless of organizer, and I can certainly update a single instance of a recurring series, e.g. changing its end date. I don't understand why manipulating the recurrence pattern would be prohibited because I'm not the organizer while manipulating an instance's spot on the calendar, or deleting the entire series would not be.
I'm appending the Req/Rsp XML to the bottom here. If anyone has over the past 5 years managed to get around this, or can confirm that, "Yes, this is just a quirk of EWS," I would appreciate hearing from you.
<?xml version="1.0" encoding="utf-16"?> <UpdateItemType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ConflictResolution="AutoResolve" SendMeetingInvitationsOrCancellations="SendOnlyToAll"> <ItemChanges xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"> <ItemChange xmlns="http://schemas.microsoft.com/exchange/services/2006/types"> <ItemId Id="AAMkADE2NDBiMTE0LTRmZGQtNDgzYy1iOGU5LWUxMzhjZDMxMjBiYwBGAAAAAADjgvNXxFXPT6Ys+2bCbp+HBwAupmAW8bxrTJDs2N0cco4uAAAEQYPEAACRcMuikqeOTox2pUs6VubLAABnWEDgAAA=" ChangeKey="DwAAABYAAACRcMuikqeOTox2pUs6VubLAABnWI76" /> <Updates> <SetItemField> <FieldURI FieldURI="calendar:Recurrence" /> <CalendarItem> <Recurrence> <DailyRecurrence> <Interval>1</Interval> </DailyRecurrence> <EndDateRecurrence> <StartDate>2013-09-29</StartDate> <EndDate>2013-10-04</EndDate> </EndDateRecurrence> </Recurrence> </CalendarItem> </SetItemField> </Updates> </ItemChange> </ItemChanges> </UpdateItemType>
<?xml version="1.0" encoding="utf-16"?> <UpdateItemResponseType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <ResponseMessages xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"> <UpdateItemResponseMessage ResponseClass="Error"> <MessageText>Set action is invalid for property.</MessageText> <ResponseCode>ErrorInvalidPropertySet</ResponseCode> <DescriptiveLinkKey>0</DescriptiveLinkKey> <MessageXml> <t:FieldURI FieldURI="calendar:Recurrence" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" /> </MessageXml> <Items /> </UpdateItemResponseMessage> </ResponseMessages> </UpdateItemResponseType>
Some new details: I have tried this in the latest EWS Managed API, and I am getting the same issue. I have also tried using impersonation, so that I am (I think) impersonating the Room resource itself, in which case, even though I am not the organizer, I feel I must be the owner of the appointment, and hence entitled to do whatever the heck I want to it. I guess Exchange feels differently.
I have considered simply deleting the remaining instances, which it seems I can do. There are two problems to this. The first is that for a specific instance, I cannot find a property that will give me the instance sequence index number, so I will have to iterate through all the instances until I get to this instance, then delete from there on--could be a lot of churn. Second, this will not work for appointments that have no end date or count.