Before closing this as a duplicate, please look at another similarly titled question, there is no answer to the problem, which he simply marked as the answer and left.
I get this beautiful and descriptive error from the EWS managed API whenever I try to edit the RequiredAttendees property in a meeting.
Set action is invalid for property.
Looking at the details of the exception, I see that this RequiredAttendees property is really causing problems, but I have no idea why.
The credentials that I use to connect to the service belong to the meeting organizer, I even tried to impersonate a person without any luck. He scratched my head, trying to figure out what was wrong here.
Here are the relevant parts of the upgrade procedure that cause problems.
PropertySet props = new PropertySet( AppointmentSchema.Start, AppointmentSchema.End, AppointmentSchema.Id, AppointmentSchema.Organizer, AppointmentSchema.Subject, AppointmentSchema.Body, AppointmentSchema.RequiredAttendees); props.RequestedBodyType = BodyType.Text; Appointment appointment = Appointment.Bind(_service, new ItemId(appointmentId), props); if (IsResource(appointment.Organizer.Address) && appointment.Organizer.Address != resourceId) { } else { List<Attendee> remove = new List<Attendee>(); foreach (var attendee in appointment.RequiredAttendees) { if (IsResource(attendee.Address) && attendee.Address != resourceId) { remove.Add(attendee); } } remove.ForEach(a => appointment.RequiredAttendees.Remove(a)); if (!appointment.RequiredAttendees.Any(a => a.Address == resourceId)) { appointment.RequiredAttendees.Add(resourceId); } } if (IsAvailable(resourceId, startTime, endTime, appointmentId)) appointment.Update(ConflictResolutionMode.AlwaysOverwrite, SendInvitationsOrCancellationsMode.SendToAllAndSaveCopy); else throw new RoomUnavailableException();
Request:
<Trace Tag = "EwsRequest" Tid="14" Time="2017-09-25 20:20:24Z" Version="15.00.0847.030"> <?xml version = "1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <t:RequestServerVersion Version = "Exchange2013" /> </ soap:Header> <soap:Body> <m:UpdateItem ConflictResolution = "AlwaysOverwrite" SendMeetingInvitationsOrCancellations="SendToAllAndSaveCopy"> <m:ItemChanges> <t:ItemChange> <t:ItemId Id = "AAMkAGEwYWRjZjA3LWNlZjAtNDI2Ny05ZjQwLWUzYWZjOThhMjkzNwBGAAAAAABWdX+yf6THTpO/1LYpoG6xBwD6lEwS6u8XQbDhIlTh/X/UAAAAAAENAAD6lEwS6u8XQbDhIlTh/X/UAAAi3oSdAAA=" ChangeKey="DwAAABYAAAD6lEwS6u8XQbDhIlTh/X/UAAAi3ocU" /> <t:Updates> <t:SetItemField> <t:FieldURI FieldURI = "calendar:RequiredAttendees" /> < t:CalendarItem> <t:RequiredAttendees> <t:Attendee> <t:Mailbox> <t:Name>Exchange Test</t:Name> <t:EmailAddress>etest @supertester.com</t:EmailAddress> <t:RoutingType>SMTP</t:RoutingType> <t:MailboxType>Mailbox</t:MailboxType> </t:Mailbox> </t:Attendee> <t:Attendee> <t:Mailbox> <t:EmailAddress>redroom @supertester.com</t:EmailAddress> </t:Mailbox> </t:Attendee> </t:RequiredAttendees> </t:CalendarItem> </t:SetItemField> </t:Updates> </t:ItemChange> </m:ItemChanges> </m:UpdateItem> </soap:Body> </soap:Envelope> </Trace> + yf6THTpO / 1LYpoG6xBwD6lEwS6u8XQbDhIlTh / X / UAAAAAAENAAD6lEwS6u8XQbDhIlTh / X / UAAAi3oSdAAA =" ChangeKey = "DwAAABYAAAD6lEwS6u8XQbDhIlTh / X / UAAAi3ocU" /> <Trace Tag = "EwsRequest" Tid="14" Time="2017-09-25 20:20:24Z" Version="15.00.0847.030"> <?xml version = "1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <t:RequestServerVersion Version = "Exchange2013" /> </ soap:Header> <soap:Body> <m:UpdateItem ConflictResolution = "AlwaysOverwrite" SendMeetingInvitationsOrCancellations="SendToAllAndSaveCopy"> <m:ItemChanges> <t:ItemChange> <t:ItemId Id = "AAMkAGEwYWRjZjA3LWNlZjAtNDI2Ny05ZjQwLWUzYWZjOThhMjkzNwBGAAAAAABWdX+yf6THTpO/1LYpoG6xBwD6lEwS6u8XQbDhIlTh/X/UAAAAAAENAAD6lEwS6u8XQbDhIlTh/X/UAAAi3oSdAAA=" ChangeKey="DwAAABYAAAD6lEwS6u8XQbDhIlTh/X/UAAAi3ocU" /> <t:Updates> <t:SetItemField> <t:FieldURI FieldURI = "calendar:RequiredAttendees" /> < t:CalendarItem> <t:RequiredAttendees> <t:Attendee> <t:Mailbox> <t:Name>Exchange Test</t:Name> <t:EmailAddress>etest @supertester.com</t:EmailAddress> <t:RoutingType>SMTP</t:RoutingType> <t:MailboxType>Mailbox</t:MailboxType> </t:Mailbox> </t:Attendee> <t:Attendee> <t:Mailbox> <t:EmailAddress>redroom @supertester.com</t:EmailAddress> </t:Mailbox> </t:Attendee> </t:RequiredAttendees> </t:CalendarItem> </t:SetItemField> </t:Updates> </t:ItemChange> </m:ItemChanges> </m:UpdateItem> </soap:Body> </soap:Envelope> </Trace>
Response Tracking:
<Trace Tag = "EwsResponse" Tid="14" Time="2017-09-25 20:20:24Z" Version="15.00.0847.030"> <?xml version = "1.0" encoding="utf-8"?> <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Header> <h:ServerVersionInfo MajorVersion = "15" MinorVersion="1" MajorBuildNumber="225" MinorBuildNumber="41" Version="V2_48" 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:UpdateItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"> <m:ResponseMessages> <m:UpdateItemResponseMessage ResponseClass = "Error" > <m:MessageText>Set action is invalid for property.</m:MessageText> <m:ResponseCode>ErrorInvalidPropertySet</m:ResponseCode> <m:DescriptiveLinkKey>0</m:DescriptiveLinkKey> <m:MessageXml> <t:FieldURI FieldURI = "calendar:RequiredAttendees" /> </m:MessageXml> <m:Items /> </m:UpdateItemResponseMessage> </m:ResponseMessages> </m:UpdateItemResponse> </s:Body> </s:Envelope> </Trace>