none
Error when attempting to save appointment with attendees (and not meeting organizer) RRS feed

  • Question

  • Hi

    Stumped. I've tried all sorts of things to allow the non-organizer to change properties of an accepted appointment. I get back an error from EWS "Set action is invalid for property".

    My last code snippet looks like this:

       ExtendedPropertyDefinition definition;
                        definition = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Appointment, 33321, MapiPropertyType.Boolean);
                        a.SetExtendedProperty(definition, true);
                        definition = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Appointment, 33303, MapiPropertyType.Integer);
                        a.SetExtendedProperty(definition, 1);
                        a.Update(ConflictResolutionMode.AlwaysOverwrite, SendInvitationsOrCancellationsMode.SendToNone);

    where a is the appointment object. It is likely trying to update the RequiredAttendees property, which I do not change anyway. Obviously, I'm trying to affect the AppointmentState through the extendedProps but it makes no difference.  I've tried all manner of permutations. If I load the property (requiredAttendees), then no error occurs - but of course I am overwriting the values I was trying to save in the first place (like Subject):

    ...

    appointment.Load(baseProps, new propertySet(AppointmentSchema.RequiredAttendees));

    This issue is similar to mine (though he is attempting to change the attendee set - I was just want to save other property values). It is unresolved (and not a single comment either).

    http://social.technet.microsoft.com/Forums/ha-Latn/exchangesvrdevelopment/thread/fc3cd5a0-4a35-4fb5-856c-4fcda42f2c46

    Is there one canonical way of doing this?

    cheers,

    Chris

    Friday, May 18, 2012 9:01 PM

All replies

  • Have you tried to enable the trace stack?

    ExchangeService.TraceEnabled = true;

    ExchangeService.TraceFlags = TraceFlags.All;

    what version of exchange are you using?

    My guess is that the property you are trying to load is not supported by your exchange server version.

    Monday, May 21, 2012 4:41 PM
  • Worked on this some more: turns out, strangely enough, that it is the StartTimeZone(?) that is causing the error. Here is the trace output (I have highlighted the offending property in the error). 

    However, when I look at the property values, they look fine: 

               <t:StartTimeZone Name="(UTC-05:00) Eastern Time (US &amp; Canada)" Id="Eastern Standard Time">

    So still stumped. 

    EwsRequest

    <Trace Tag="EwsRequest" Tid="5" Time="2012-05-22 19:54:08Z" Version="14.02.0051.000">
      <?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="Exchange2010_SP1" />
        </soap:Header>
        <soap:Body>
          <m:UpdateItem ConflictResolution="AlwaysOverwrite" SendMeetingInvitationsOrCancellations="SendToNone">
            <m:ItemChanges>
              <t:ItemChange>
                <t:ItemId Id="AAMkAGEzNjIxZTRkLTNhNzgtNGY0Mi04ZjM1LTQ2ZTUxYTk5MjEwZgBGAAAAAAA7SEcmdW6fQaqRQRFbrZ3YBwDCzmxrqY/dQ4yOfGaC/vtRAAAAHnw9AADGxBoYP2jwSrIUS9s2EfLTAAAAczOeAAA=" ChangeKey="DwAAABYAAADGxBoYP2jwSrIUS9s2EfLTAAAAgywg" />
                <t:Updates>
                  <t:SetItemField>
                    <t:FieldURI FieldURI="calendar:StartTimeZone" />
                    <t:CalendarItem>
                      <t:StartTimeZone Name="(UTC-05:00) Eastern Time (US &amp; Canada)" Id="Eastern Standard Time">
                        <t:Periods>
                          <t:Period Bias="P0DT5H0M0.0S" Name="Standard" Id="Std" />
                          <t:Period Bias="P0DT4H0M0.0S" Name="Daylight" Id="Dlt/1" />
                          <t:Period Bias="P0DT4H0M0.0S" Name="Daylight" Id="Dlt/2007" />
                        </t:Periods>
                        <t:TransitionsGroups>
                          <t:TransitionsGroup Id="0">
                            <t:RecurringDayTransition>
                              <t:To Kind="Period">Dlt/1</t:To>
                              <t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>
                              <t:Month>4</t:Month>
                              <t:DayOfWeek>Sunday</t:DayOfWeek>
                              <t:Occurrence>1</t:Occurrence>
                            </t:RecurringDayTransition>
                            <t:RecurringDayTransition>
                              <t:To Kind="Period">Std</t:To>
                              <t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>
                              <t:Month>10</t:Month>
                              <t:DayOfWeek>Sunday</t:DayOfWeek>
                              <t:Occurrence>-1</t:Occurrence>
                            </t:RecurringDayTransition>
                          </t:TransitionsGroup>
                          <t:TransitionsGroup Id="1">
                            <t:RecurringDayTransition>
                              <t:To Kind="Period">Dlt/2007</t:To>
                              <t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>
                              <t:Month>3</t:Month>
                              <t:DayOfWeek>Sunday</t:DayOfWeek>
                              <t:Occurrence>2</t:Occurrence>
                            </t:RecurringDayTransition>
                            <t:RecurringDayTransition>
                              <t:To Kind="Period">Std</t:To>
                              <t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>
                              <t:Month>11</t:Month>
                              <t:DayOfWeek>Sunday</t:DayOfWeek>
                              <t:Occurrence>1</t:Occurrence>
                            </t:RecurringDayTransition>
                          </t:TransitionsGroup>
                        </t:TransitionsGroups>
                        <t:Transitions>
                          <t:Transition>
                            <t:To Kind="Group">0</t:To>
                          </t:Transition>
                          <t:AbsoluteDateTransition>
                            <t:To Kind="Group">1</t:To>
                            <t:DateTime>2007-01-01T05:00:00Z</t:DateTime>
                          </t:AbsoluteDateTransition>
                        </t:Transitions>
                      </t:StartTimeZone>
                    </t:CalendarItem>
                  </t:SetItemField>
                  <t:SetItemField>
                    <t:FieldURI FieldURI="calendar:EndTimeZone" />
                    <t:CalendarItem>
                      <t:EndTimeZone Name="(UTC-05:00) Eastern Time (US &amp; Canada)" Id="Eastern Standard Time">
                        <t:Periods>
                          <t:Period Bias="P0DT5H0M0.0S" Name="Standard" Id="Std" />
                          <t:Period Bias="P0DT4H0M0.0S" Name="Daylight" Id="Dlt/1" />
                          <t:Period Bias="P0DT4H0M0.0S" Name="Daylight" Id="Dlt/2007" />
                        </t:Periods>
                        <t:TransitionsGroups>
                          <t:TransitionsGroup Id="0">
                            <t:RecurringDayTransition>
                              <t:To Kind="Period">Dlt/1</t:To>
                              <t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>
                              <t:Month>4</t:Month>
                              <t:DayOfWeek>Sunday</t:DayOfWeek>
                              <t:Occurrence>1</t:Occurrence>
                            </t:RecurringDayTransition>
                            <t:RecurringDayTransition>
                              <t:To Kind="Period">Std</t:To>
                              <t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>
                              <t:Month>10</t:Month>
                              <t:DayOfWeek>Sunday</t:DayOfWeek>
                              <t:Occurrence>-1</t:Occurrence>
                            </t:RecurringDayTransition>
                          </t:TransitionsGroup>
                          <t:TransitionsGroup Id="1">
                            <t:RecurringDayTransition>
                              <t:To Kind="Period">Dlt/2007</t:To>
                              <t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>
                              <t:Month>3</t:Month>
                              <t:DayOfWeek>Sunday</t:DayOfWeek>
                              <t:Occurrence>2</t:Occurrence>
                            </t:RecurringDayTransition>
                            <t:RecurringDayTransition>
                              <t:To Kind="Period">Std</t:To>
                              <t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>
                              <t:Month>11</t:Month>
                              <t:DayOfWeek>Sunday</t:DayOfWeek>
                              <t:Occurrence>1</t:Occurrence>
                            </t:RecurringDayTransition>
                          </t:TransitionsGroup>
                        </t:TransitionsGroups>
                        <t:Transitions>
                          <t:Transition>
                            <t:To Kind="Group">0</t:To>
                          </t:Transition>
                          <t:AbsoluteDateTransition>
                            <t:To Kind="Group">1</t:To>
                            <t:DateTime>2007-01-01T05:00:00Z</t:DateTime>
                          </t:AbsoluteDateTransition>
                        </t:Transitions>
                      </t:EndTimeZone>
                    </t:CalendarItem>
                  </t:SetItemField>
                  <t:SetItemField>
                    <t:ExtendedFieldURI DistinguishedPropertySetId="Common" PropertyId="34100" PropertyType="String" />
                    <t:CalendarItem>
                      <t:ExtendedProperty>
                        <t:ExtendedFieldURI DistinguishedPropertySetId="Common" PropertyId="34100" PropertyType="String" />
                        <t:Value>09cf3ecc-a957-46b8-a0a6-acef928b77af</t:Value>
                      </t:ExtendedProperty>
                    </t:CalendarItem>
                  </t:SetItemField>
                  <t:SetItemField>
                    <t:ExtendedFieldURI PropertySetId="2a7dbec6-42be-4aee-9c53-5acd344a19f1" PropertyName="AmicusUserIds" PropertyType="String" />
                    <t:CalendarItem>
                      <t:ExtendedProperty>
                        <t:ExtendedFieldURI PropertySetId="2a7dbec6-42be-4aee-9c53-5acd344a19f1" PropertyName="AmicusUserIds" PropertyType="String" />
                        <t:Value>37b94051-646e-4194-b4b3-1bf627d63b04</t:Value>
                      </t:ExtendedProperty>
                    </t:CalendarItem>
                  </t:SetItemField>
                  <t:SetItemField>
                    <t:FieldURI FieldURI="item:Subject" />
                    <t:CalendarItem>
                      <t:Subject>t8 o-l</t:Subject>
                    </t:CalendarItem>
                  </t:SetItemField>
                  <t:SetItemField>
                    <t:FieldURI FieldURI="item:Body" />
                    <t:CalendarItem>
                      <t:Body BodyType="HTML">&lt;html&gt;
    &lt;head&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
    &lt;meta name="Generator" content="Microsoft Exchange Server"&gt;
    &lt;!-- converted from rtf --&gt;
    &lt;style&gt;&lt;!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --&gt;&lt;/style&gt;
    &lt;/head&gt;
    &lt;body&gt;
    &lt;font face="Times New Roman" size="3"&gt;&lt;span style="font-size:12pt;"&gt;&lt;a name="BM_BEGIN"&gt;&lt;/a&gt;
    &lt;div&gt;&amp;nbsp;&lt;/div&gt;
    &lt;div&gt;&lt;br&gt;

    &lt;/div&gt;
    &lt;/span&gt;&lt;/font&gt;
    &lt;/body&gt;
    &lt;/html&gt;
    </t:Body>
                    </t:CalendarItem>
                  </t:SetItemField>
                  <t:SetItemField>
                    <t:FieldURI FieldURI="calendar:Location" />
                    <t:CalendarItem>
                      <t:Location>k</t:Location>
                    </t:CalendarItem>
                  </t:SetItemField>
                  <t:SetItemField>
                    <t:FieldURI FieldURI="calendar:IsAllDayEvent" />
                    <t:CalendarItem>
                      <t:IsAllDayEvent>false</t:IsAllDayEvent>
                    </t:CalendarItem>
                  </t:SetItemField>
                  <t:SetItemField>
                    <t:FieldURI FieldURI="item:Sensitivity" />
                    <t:CalendarItem>
                      <t:Sensitivity>Normal</t:Sensitivity>
                    </t:CalendarItem>
                  </t:SetItemField>
                  <t:SetItemField>
                    <t:FieldURI FieldURI="calendar:Start" />
                    <t:CalendarItem>
                      <t:Start>2012-05-19T22:00:00Z</t:Start>
                    </t:CalendarItem>
                  </t:SetItemField>
                  <t:SetItemField>
                    <t:FieldURI FieldURI="calendar:End" />
                    <t:CalendarItem>
                      <t:End>2012-05-19T23:00:00Z</t:End>
                    </t:CalendarItem>
                  </t:SetItemField>
                  <t:SetItemField>
                    <t:FieldURI FieldURI="item:ReminderIsSet" />
                    <t:CalendarItem>
                      <t:ReminderIsSet>false</t:ReminderIsSet>
                    </t:CalendarItem>
                  </t:SetItemField>
                  <t:SetItemField>
                    <t:FieldURI FieldURI="calendar:StartTimeZone" />
                    <t:CalendarItem>
                      <t:StartTimeZone Name="(UTC-05:00) Eastern Time (US &amp; Canada)" Id="Eastern Standard Time">
                        <t:Periods>
                          <t:Period Bias="P0DT5H0M0.0S" Name="Standard" Id="Std" />
                          <t:Period Bias="P0DT4H0M0.0S" Name="Daylight" Id="Dlt/1" />
                          <t:Period Bias="P0DT4H0M0.0S" Name="Daylight" Id="Dlt/2007" />
                        </t:Periods>
                        <t:TransitionsGroups>
                          <t:TransitionsGroup Id="0">
                            <t:RecurringDayTransition>
                              <t:To Kind="Period">Dlt/1</t:To>
                              <t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>
                              <t:Month>4</t:Month>
                              <t:DayOfWeek>Sunday</t:DayOfWeek>
                              <t:Occurrence>1</t:Occurrence>
                            </t:RecurringDayTransition>
                            <t:RecurringDayTransition>
                              <t:To Kind="Period">Std</t:To>
                              <t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>
                              <t:Month>10</t:Month>
                              <t:DayOfWeek>Sunday</t:DayOfWeek>
                              <t:Occurrence>-1</t:Occurrence>
                            </t:RecurringDayTransition>
                          </t:TransitionsGroup>
                          <t:TransitionsGroup Id="1">
                            <t:RecurringDayTransition>
                              <t:To Kind="Period">Dlt/2007</t:To>
                              <t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>
                              <t:Month>3</t:Month>
                              <t:DayOfWeek>Sunday</t:DayOfWeek>
                              <t:Occurrence>2</t:Occurrence>
                            </t:RecurringDayTransition>
                            <t:RecurringDayTransition>
                              <t:To Kind="Period">Std</t:To>
                              <t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>
                              <t:Month>11</t:Month>
                              <t:DayOfWeek>Sunday</t:DayOfWeek>
                              <t:Occurrence>1</t:Occurrence>
                            </t:RecurringDayTransition>
                          </t:TransitionsGroup>
                        </t:TransitionsGroups>
                        <t:Transitions>
                          <t:Transition>
                            <t:To Kind="Group">0</t:To>
                          </t:Transition>
                          <t:AbsoluteDateTransition>
                            <t:To Kind="Group">1</t:To>
                            <t:DateTime>2007-01-01T05:00:00Z</t:DateTime>
                          </t:AbsoluteDateTransition>
                        </t:Transitions>
                      </t:StartTimeZone>
                    </t:CalendarItem>
                  </t:SetItemField>
                </t:Updates>
              </t:ItemChange>
            </m:ItemChanges>
          </m:UpdateItem>
        </soap:Body>
      </soap:Envelope>
    </Trace>
    EwsResponseHttpHeaders
    <Trace Tag="EwsResponseHttpHeaders" Tid="5" Time="2012-05-22 19:54:08Z">
    200 OK
    Transfer-Encoding: chunked
    Content-Encoding: gzip
    Vary: Accept-Encoding
    X-EwsPerformanceData: RpcC=1;RpcL=0;LdapC=0;LdapL=0;
    Persistent-Auth: false
    Cache-Control: private
    Content-Type: text/xml; charset=utf-8
    Date: Tue, 22 May 2012 19:54:07 GMT
    Server: Microsoft-IIS/7.5
    WWW-Authenticate: Negotiate oYGyMIGvoAMKAQChCwYJKoZIgvcSAQICooGaBIGXYIGUBgkqhkiG9xIBAgICAG+BhDCBgaADAgEFoQMCAQ+idTBzoAMCAReibARq+0QjivhJ0SN9l7prBWxzvGeaI3+2Um5OcdU0BfCBWgQR8viejuCWp+xFp3FtXP8u+xt6mux12fL+EJyMRPf6h2gY2kwvEJb2QIv4bRJF0lLCeVKfD1SMQa0xNIj5GLo+U+gZ+UDBfoRXWg==
    X-AspNet-Version: 2.0.50727
    X-Powered-By: ASP.NET


    </Trace>
    EwsResponse
    <Trace Tag="EwsResponse" Tid="5" Time="2012-05-22 19:54:08Z" Version="14.02.0051.000">
      <?xml version="1.0" encoding="utf-8"?>
      <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
        <s:Header>
          <h:ServerVersionInfo MajorVersion="14" MinorVersion="1" MajorBuildNumber="355" MinorBuildNumber="2" Version="Exchange2010_SP1" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
        </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:StartTimeZone" />
                </m:MessageXml>
                <m:Items />
              </m:UpdateItemResponseMessage>
            </m:ResponseMessages>
          </m:UpdateItemResponse>
        </s:Body>
      </s:Envelope>
    </Trace>

    Wednesday, May 23, 2012 7:18 PM
  • OK so the error indicates maybe why it is failing out. So now I don't set it anymore and it saves. But the appointment now appears to be UTC or be interpreted as UTC (it appears in the calendar 4 hours earlier that the original time).  How do I set the timezone?
    Wednesday, May 23, 2012 7:53 PM