Getting PidLidEndRecurrenceDate value using Ews


What is the correct way of getting PidLidEndRecurrenceDate values using Ews. below code does not give proper result. property details that i am looking is

        ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013_SP1);
        service.Credentials = new WebCredentials("", "XXX");

        service.Url = new Uri("");

        ItemView view = new ItemView(10); 
        Guid MyPropertySetId = new Guid("{6ED8DA90-450B-101B-98DA-00AA003F1305}");

        int intValue = Convert.ToInt32("0x0000000F", 16);
        ExtendedPropertyDefinition extendedPropertyDefinition =
          new ExtendedPropertyDefinition(MyPropertySetId, intValue, MapiPropertyType.Integer);

        view.PropertySet =
         new PropertySet(BasePropertySet.IdOnly, ItemSchema.Subject, extendedPropertyDefinition);

        FindItemsResults<Item> findResults = service.FindItems(WellKnownFolderName.Calendar, view);

        foreach (Item item in findResults.Items)
            if (item.ExtendedProperties.Count > 0)
                // Display the extended name and value of the extended property.
                foreach (ExtendedProperty extendedProperty in item.ExtendedProperties)
                    Console.WriteLine(" Extended Property Name: " + extendedProperty.PropertyDefinition.Name);
                    Console.WriteLine(" Extended Property Value: " + extendedProperty.Value);
asked on Stack Overflow Apr 29, 2020 by InfoƁsith

1 Answer


That property is set on the Meeting invite messages only not on the Master instance of the Calendar Appointments which is what you seem to be looking at. For the Master instances you should just be able to use the strongly typed property

It you wanted to view the property you have above search the SentItems Folder for invites with recurrences (with Enddates) and that's where you will see it. Or probably easier just look at the messages with a Mapi editor like OutlookSpy or MFCMAPI and you will see the properties available.

answered on Stack Overflow Apr 30, 2020 by Glen Scales

User contributions licensed under CC BY-SA 3.0