Vadims Samsinovs
Vadims Samsinovs

Reputation: 114

Exchange Api returns "Set action is invalid for property." on update

I have a rather simple Exchange Api application with one major issue; Required/Optional Attendees for appointments created from Outlook cannot be update. However appointments that are created from application can be fully updated on both ends.

{"Set action is invalid for property."}

Is the return that I get. Here is XML that is being returned:

<Trace Tag="EwsResponse" Tid="6" Time="2015-07-05 10:41:38Z" 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="201" MinorBuildNumber="17" Version="V2_46" xmlns:h="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>
      <m:UpdateItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:OptionalAttendees" />
            </m:MessageXml>
            <m:Items />
          </m:UpdateItemResponseMessage>
        </m:ResponseMessages>
      </m:UpdateItemResponse>
    </s:Body>
  </s:Envelope>
</Trace>

And yes, I do load them beforehand:

 Appointment appointment = Appointment.Bind(service,
            new ItemId(meeting.MeetingId),
            new PropertySet(BasePropertySet.FirstClassProperties, 
                AppointmentSchema.RequiredAttendees, 
                AppointmentSchema.OptionalAttendees,
                AppointmentSchema.AppointmentState));

Please help!!

Upvotes: 1

Views: 1292

Answers (1)

pjneary
pjneary

Reputation: 1246

This is a bit of a guess here, but I suspect that attendees can only be updated by the organizer. Thus if your app authenticates with credentials other than the person who made the appointment, EWS will not allow this. I have seen this with updating of the recurrence pattern, hence my guess about attendees. If you can impersonate the organizer, that may work, however that type of permission might not always be available.

Upvotes: 2

Related Questions