none
[Exchange-Online][EWSMA][C#] Set action is invalid for property RRS feed

  • Question

  • Hi,

    I'm using Exchange (Office 365) and I have a problem with appointments that have 'corrupted' StartTimeZone properties. When I request the appointment I get the following StartTimeZone property in the response:

    <t:StartTimeZone Name="" Id="&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;">
      <t:Periods>
        <t:Period Bias="-PT1H" Name="Standard" Id="trule:Microsoft/Registry/&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;/1-Standard"/>
    	<t:Period Bias="-PT2H" Name="Daylight" Id="trule:Microsoft/Registry/&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;/1-Daylight"/>
      </t:Periods>
      <t:TransitionsGroups>
        <t:TransitionsGroup Id="0">
    	  <t:RecurringDayTransition>
    	    <t:To Kind="Period">trule:Microsoft/Registry/&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;/1-Daylight</t:To>
    		<t:TimeOffset>PT2H</t:TimeOffset>
    		<t:Month>3</t:Month>
    		<t:DayOfWeek>Sunday</t:DayOfWeek>
    		<t:Occurrence>-1</t:Occurrence>
    	  </t:RecurringDayTransition>
    	  <t:RecurringDayTransition>
    	    <t:To Kind="Period">trule:Microsoft/Registry/&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;/1-Standard</t:To>
    		<t:TimeOffset>PT3H</t:TimeOffset>
    		<t:Month>10</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:Transitions>
    </t:StartTimeZone>

    As you can see the StartTimeZone Id as well as some other nested properties contain null characters. I'm trying to 'fix' this appointment by settings the StartTimeZone to UTC, but when I try to update the appointment I get the error: Set action is invalid for property. 

    The request XML is as follows:

    <?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 MessageDisposition="SaveOnly" ConflictResolution="AlwaysOverwrite" SendMeetingInvitationsOrCancellations="SendToNone">
          <m:SavedItemFolderId>
            <t:FolderId Id="AQMkAGEwMjNlYmM3LWUzYTEtNDllMS1iOWVjLTBlOGIxNTA0MjUwNAAuAAADtguy/eJ/vEKOus9XxaWQUAEAqTiKPVjqr0ScW5mGWLzzBQAAAgEOAAAA" ChangeKey="AQAAAA==" />
          </m:SavedItemFolderId>
          <m:ItemChanges>
            <t:ItemChange>
              <t:ItemId Id="AAMkAGEwMjNlYmM3LWUzYTEtNDllMS1iOWVjLTBlOGIxNTA0MjUwNABGAAAAAAC2C7L94n+8Qo66z1fFpZBQBwCpOIo9WOqvRJxbmYZYvPMFAAAAAAEOAACpOIo9WOqvRJxbmYZYvPMFAADQ7y2bAAA=" ChangeKey="DwAAABYAAACpOIo9WOqvRJxbmYZYvPMFAAFCDmdE" />
              <t:Updates>
                <t:SetItemField>
                  <t:FieldURI FieldURI="calendar:Start" />
                  <t:CalendarItem>
                    <t:Start>2015-07-02T10:00:00.000Z</t:Start>
                  </t:CalendarItem>
                </t:SetItemField>
                <t:SetItemField>
                  <t:FieldURI FieldURI="calendar:StartTimeZone" />
                  <t:CalendarItem>
                    <t:StartTimeZone Name="UTC" Id="UTC">
                      <t:Periods>
                        <t:Period Bias="P0DT0H0M0.0S" Name="Standard" Id="Std" />
                      </t:Periods>
                      <t:TransitionsGroups>
                        <t:TransitionsGroup Id="0">
                          <t:Transition>
                            <t:To Kind="Period">Std</t:To>
                          </t:Transition>
                        </t:TransitionsGroup>
                      </t:TransitionsGroups>
                      <t:Transitions>
                        <t:Transition>
                          <t:To Kind="Group">0</t:To>
                        </t:Transition>
                      </t:Transitions>
                    </t:StartTimeZone>
                  </t:CalendarItem>
                </t:SetItemField>
                <t:SetItemField>
                  <t:FieldURI FieldURI="calendar:End" />
                  <t:CalendarItem>
                    <t:End>2015-07-02T12:00:00.000Z</t:End>
                  </t:CalendarItem>
                </t:SetItemField>
                <t:SetItemField>
                  <t:FieldURI FieldURI="calendar:EndTimeZone" />
                  <t:CalendarItem>
                    <t:EndTimeZone Name="UTC" Id="UTC">
                      <t:Periods>
                        <t:Period Bias="P0DT0H0M0.0S" Name="Standard" Id="Std" />
                      </t:Periods>
                      <t:TransitionsGroups>
                        <t:TransitionsGroup Id="0">
                          <t:Transition>
                            <t:To Kind="Period">Std</t:To>
                          </t:Transition>
                        </t:TransitionsGroup>
                      </t:TransitionsGroups>
                      <t:Transitions>
                        <t:Transition>
                          <t:To Kind="Group">0</t:To>
                        </t:Transition>
                      </t:Transitions>
                    </t:EndTimeZone>
                  </t:CalendarItem>
                </t:SetItemField>
              </t:Updates>
            </t:ItemChange>
          </m:ItemChanges>
        </m:UpdateItem>
      </soap:Body>
    </soap:Envelope>

    and the following response comes back:

    <?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:StartTimeZone" /> </m:MessageXml> <m:Items /> </m:UpdateItemResponseMessage> </m:ResponseMessages> </m:UpdateItemResponse> </s:Body> </s:Envelope>

    How can it be that Exchange sends back an invalid StartTimeZone, and I'm unable to change it to a valid timezone?

    BTW EWSEditor shows an empty value for StartTimeZone: EWS editor

    Monday, July 6, 2015 9:58 AM

Answers

  • Update: I still don't know why the TimeZone Id has null characters but the reason I was unable to update the StartTimeZone of the appointment because this appointment is a meeting and I'm not its organizer. Attendees are not allowed to update a meeting's StartTimeZone (and EndTimeZone).
    Tuesday, July 7, 2015 7:21 AM

All replies

  • Update: I still don't know why the TimeZone Id has null characters but the reason I was unable to update the StartTimeZone of the appointment because this appointment is a meeting and I'm not its organizer. Attendees are not allowed to update a meeting's StartTimeZone (and EndTimeZone).
    Tuesday, July 7, 2015 7:21 AM
  • Bart, did you ever manage to fix this? If so, by the above calls as organizer, or did you let the users fix it through  the UI one way or another?

    And do you hav any idea about how the corruptions may have crept in?

    I'm facing the same issue with a customers' Exchange online store, and looking for an effective way to fix this.

    Thanks

    Jan Doggen

    Friday, October 2, 2015 12:08 PM