EWS Managed API: Error message "Property is not valid for this object type."? RRS feed

  • Question

  • In my application I use the Exchange Web Services Managed API to get information for mailboxes of a MS Exchange Server 2010.

    Over Impersonation and PullNotification e.g. I can get calendar changes for a specific mailbox.

    With (Appointment)Item.Bind(...) (with ItemId from the SupscriptionModifyEvent and a PropertySet) I want to get the Appointment object. This action generate the following error:

    19.11.10 16:42:15:685   7 EXCEPTION: ExchUser.DoCalendarNotification(): calendar item modified, failed to get event details (ItemId: AAMkADY4MjkyYzMyLTQ3NTEtNGIxMi1hZjdiLWIwMmIyZDMyOGQ0MQBGAAAAAAA+7pVECVVcQYw/olZhzTbrBwA/cePxDc0KSobudrIltCvrAAACPl4uAADhzW2p4iXhSLNI7Vgh9jurAAAAAFvyAAA=) [Property is not valid for this object type.]

       bei Microsoft.Exchange.WebServices.Data.ServiceResponse.InternalThrowIfNecessary()
       bei Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute()
       bei Microsoft.Exchange.WebServices.Data.ExchangeService.InternalBindToItems(IEnumerable`1 itemIds, PropertySet propertySet, ServiceErrorHandling errorHandling)
       bei Microsoft.Exchange.WebServices.Data.ExchangeService.BindToItem(ItemId itemId, PropertySet propertySet)
       bei Microsoft.Exchange.WebServices.Data.ExchangeService.BindToItem[TItem](ItemId itemId, PropertySet propertySet)
       bei Microsoft.Exchange.WebServices.Data.Item.Bind(ExchangeService service, ItemId id, PropertySet propertySet)
       bei Aastra.Oip.MSExchangeDriverEws.ExchUser.DoCalendarNotification()

    The corresponding EWS XML messages:

    <Trace Tag="EwsRequest" Tid="7" Time="2010-11-19 15:42:15Z" Version="14.01.0180.002">
      <?xml version="1.0" encoding="utf-8"?>
      <soap:Envelope xmlns:xsi="" xmlns:m="" xmlns:t="" xmlns:soap="">
          <t:RequestServerVersion Version="Exchange2010" />
                <t:FieldURI FieldURI="calendar:CalendarItemType" />
                <t:FieldURI FieldURI="item:Categories" />
                <t:FieldURI FieldURI="calendar:End" />
                <t:FieldURI FieldURI="calendar:RecurrenceId" />
                <t:FieldURI FieldURI="calendar:IsAllDayEvent" />
                <t:FieldURI FieldURI="calendar:IsMeeting" />
                <t:FieldURI FieldURI="calendar:IsRecurring" />
                <t:FieldURI FieldURI="item:ReminderIsSet" />
                <t:FieldURI FieldURI="calendar:LegacyFreeBusyStatus" />
                <t:FieldURI FieldURI="calendar:Location" />
                <t:FieldURI FieldURI="item:ReminderDueBy" />
                <t:FieldURI FieldURI="item:ReminderMinutesBeforeStart" />
                <t:FieldURI FieldURI="item:Sensitivity" />
                <t:FieldURI FieldURI="calendar:Start" />
                <t:FieldURI FieldURI="item:Subject" />
                <t:ExtendedFieldURI DistinguishedPropertySetId="PublicStrings" PropertyName="OIPAbsenceReason" PropertyType="Integer" />
                <t:ExtendedFieldURI PropertySetId="00062008-0000-0000-c000-000000000046" PropertyId="34144" PropertyType="SystemTime" />
              <t:ItemId Id="AAMkADY4MjkyYzMyLTQ3NTEtNGIxMi1hZjdiLWIwMmIyZDMyOGQ0MQBGAAAAAAA+7pVECVVcQYw/olZhzTbrBwA/cePxDc0KSobudrIltCvrAAACPl4uAADhzW2p4iXhSLNI7Vgh9jurAAAAAFvyAAA=" ChangeKey="CQAAAA==" />

    <Trace Tag="EwsResponseHttpHeaders" Tid="7" Time="2010-11-19 15:42:15Z">
    200 OK
    Transfer-Encoding: chunked
    Content-Encoding: gzip
    Vary: Accept-Encoding
    Persistent-Auth: false
    Cache-Control: private
    Content-Type: text/xml; charset=utf-8
    Date: Fri, 19 Nov 2010 15:42:07 GMT
    Server: Microsoft-IIS/7.5
    WWW-Authenticate: Negotiate oYGhMIGeoAMKAQChCwYJKoZIgvcSAQICooGJBIGGYIGDBgkqhkiG9xIBAgICAG90MHKgAwIBBaEDAgEPomYwZKADAgEXol0EW45uc5T81Btd7rZGCWLtrFsT/pvXFZlJCB1Y1ynWIdWWNQEvCqGuHM+m42PpooAm3hrMGtmRlkHETxpRZfKU+ZuaZIzr8KjzmR61wlSRQRmRbd6beWv9APMhFfU=
    X-AspNet-Version: 2.0.50727
    X-Powered-By: ASP.NET

    <Trace Tag="EwsResponse" Tid="7" Time="2010-11-19 15:42:15Z" Version="14.01.0180.002">
      <?xml version="1.0" encoding="utf-8"?>
      <s:Envelope xmlns:s="">
          <h:ServerVersionInfo MajorVersion="14" MinorVersion="1" MajorBuildNumber="218" MinorBuildNumber="14" Version="Exchange2010_SP1" xmlns:h="" xmlns="" xmlns:xsi="" xmlns:xsd="" />
        <s:Body xmlns:xsi="" xmlns:xsd="">
          <m:GetItemResponse xmlns:m="" xmlns:t="">
              <m:GetItemResponseMessage ResponseClass="Error">
                <m:MessageText>Property is not valid for this object type.</m:MessageText>
                  <t:FieldURI FieldURI="calendar:CalendarItemType" />
                <m:Items />

    Can someone tell me what's wrong? Which property makes these trobles?

    Monday, November 22, 2010 9:23 AM

All replies

  • It's hard to say without seeing the application code.  But it seems to be complaining because the following line

      <t:FieldURI FieldURI="calendar:CalendarItemType" />

    has appeared as a property in your request when it should not.  See if you have added this somewhere you should not have.

    Outlook Web Access For PDA , OWA For WAP
    email a@t leederbyshire d.0.t c.0.m
    Monday, November 22, 2010 4:20 PM
  • Thank's for your answer.

    I use this PropertySet to bind the Item from the PullSubscription events:

     calPropSet = new
                                                               AppointmentSchema .AppointmentType,
                                                               AppointmentSchema .Categories,
                                                               AppointmentSchema .End,
                                                               AppointmentSchema .ICalRecurrenceId,
                                                               AppointmentSchema .IsAllDayEvent,
                                                               AppointmentSchema .IsMeeting,
                                                               AppointmentSchema .IsRecurring,
                                                               AppointmentSchema .IsReminderSet,
                                                               AppointmentSchema .LegacyFreeBusyStatus,
                                                               AppointmentSchema .Location,
                                                               AppointmentSchema .ReminderDueBy,
                                                               AppointmentSchema .ReminderMinutesBeforeStart,
                                                               AppointmentSchema .Sensitivity,
                                                               AppointmentSchema .Start,
                                                               AppointmentSchema .Subject,
     ewsAppointment = (Appointment
    .Bind(_service, itemEvent.ItemId, EwsHelper
    You mean I should remove "AppointmentSchema
    .AppointmentType" from the PropertySet?
    Tuesday, November 23, 2010 7:27 AM
  • The error message you see mentions only calendar:CalendarItemType, not AppointmentType, but it's hard to tell if the message is telling you that calendar:CalendarItemType is an invalid property, or if it is the actual object type that there is an invalid property for.  Where do ExtPropOIPCalendarAbsenceReason and ExtPropFlagDueBy come from?  You are defining them elsewhere?  Or have you seen them in a schema somewhere?  They look a little strange to me, that's all.
    Outlook Web Access For PDA , OWA For WAP
    email a@t leederbyshire d.0.t c.0.m
    Friday, November 26, 2010 1:41 PM
  • This is the hole declaration of this PropertySet:

     PropFlagDueByGuid = "{00062008-0000-0000-C000-000000000046}"
        public  const  int  PropFlagDueById = 0x8560;
        public  const  string  CalendarExtPropOIPAbsenceReason = "OIPAbsenceReason" ;
        #endregion  Constants

        #region  Members
        private  static  ExtendedPropertyDefinition  m_extPropertyOIPCalendarAbsenceReason = 
          new  ExtendedPropertyDefinition (DefaultExtendedPropertySet .PublicStrings, CalendarExtPropOIPAbsenceReason, MapiPropertyType .Integer);
        private  static  ExtendedPropertyDefinition  m_extPropertyFlagDueBy = 
          new  ExtendedPropertyDefinition (new  Guid (PropFlagDueByGuid), PropFlagDueById, MapiPropertyType .SystemTime);

        public  static  PropertySet  calPropSet = new  PropertySet (BasePropertySet .IdOnly,
                                                               AppointmentSchema .AppointmentType,
                                                               AppointmentSchema .Categories,
                                                               AppointmentSchema .End,
                                                               AppointmentSchema .ICalRecurrenceId,
                                                               AppointmentSchema .IsAllDayEvent,
                                                               AppointmentSchema .IsMeeting,
                                                               AppointmentSchema .IsRecurring,
                                                               AppointmentSchema .IsReminderSet,
                                                               AppointmentSchema .LegacyFreeBusyStatus,
                                                               AppointmentSchema .Location,
                                                               AppointmentSchema .ReminderDueBy,
                                                               AppointmentSchema .ReminderMinutesBeforeStart,
                                                               AppointmentSchema .Sensitivity,
                                                               AppointmentSchema .Start,
                                                               AppointmentSchema .Subject,

    The ExtPropOIPCalendarAbsenceReason property is a "private" property.

    The ExtPropFlagDueBy is an extended property for appointments.

    This error occurs only for change events!


    Monday, November 29, 2010 7:19 AM
  • meggensc,

    I believe the calendar:CalendarItemType mentioned in the error message is exposed by the AppointmentSchema
    .AppointmentType part of your property set in the EWS Managed API. Can you request the AppointmentSchema.ItemClass property for the very same object identified in the request above? I ask because I wonder whether the item is an actual calendar item since the error message states: "property is not valid for this object type". You will need to remove the AppointmentSchema
    .AppointmentType part to send that request with the ItemClass property for that particular item. 

    Hopefully that will give us more information.

    With regards,

    Michael | Microsoft Exchange SDK
    Tuesday, November 30, 2010 12:39 AM
  • I think this AppointmentType can not be the problem. Because we have some other installations without these problems. And we need this AppointmentType for managing the reccurance (Is the object the RecurringMaster or Occurence or Exception).

    In the meantime this exception no longer occures. We don't know why and what happend in the network of this customer or what about the MS Echange Server environment (in our application we have nothing changed with this PropertySet).

    Thank you anyway for your inputs and help.

    Kind regards,


    Friday, December 3, 2010 1:01 PM