Appointment.Sensitivity not updating after modification to the appointments Private switch RRS feed

  • Question

  • I create a private (check Mark As Private) meeting in OWA

    Using GetAppointment I query for the meeting and retrieve it with the proper Sensitivity value of Private

     public Appointment GetAppointment(ItemEvent itemEvent)
                Appointment appointment;
                try {
                    appointment= Appointment.Bind(exchangeService, itemEvent.ItemId.ToString());
                    ExtendedPropertyDefinition prop = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Appointment, 0x8238, MapiPropertyType.String);
                    PropertySet psPropset = new PropertySet(BasePropertySet.FirstClassProperties) { AppointmentSchema.Subject,AppointmentSchema.Body, prop };                
                } catch (Exception ex) {
                    Logger eventLogger = new Logger();
                    eventLogger.WriteToEventLog(true, 108, "ExchangeDataAccess error GetAppointment: " + ex.Message);
                    appointment = null; ;
                return appointment;

    Go back to OWA and edit the meeting so that it is NOT private.  Run the same GetAppointment for that meeting again but the Sensitivity value is still Private even though it should be `Normal`

    Its whenever the meeting changes from Private to Normal that Sensitivity is not updated.  The reverse does properly update the Sensitivity [going from Normal to Private].

    • Edited by owen gerig Friday, June 20, 2014 7:53 PM
    Friday, June 20, 2014 7:51 PM

All replies

  • What version/servicepack/rollup of Exchange are you using ?

    Have you tried looking that the raw values of the property using a MAPI editor like OutlookSpy of MFCMapi ?

    The other thing to test is look at the extended property value rather then the strong types to see if that makes a differance eg

            ExtendedPropertyDefinition PR_SENSITIVITY = new ExtendedPropertyDefinition(0x0036, MapiPropertyType.Integer);
            var propertiesToLoad = new PropertySet(BasePropertySet.FirstClassProperties) { RequestedBodyType = Microsoft.Exchange.WebServices.Data.BodyType.Text };
            service.LoadPropertiesForItems(items, propertiesToLoad);
            foreach (Appointment aptval in items)
                Int32 SensVal = 0;
                if (aptval.TryGetProperty(PR_SENSITIVITY, out SensVal))
                        case 0 : Console.WriteLine("SENSITIVITY_NONE");
                        case 1 : Console.WriteLine("SENSITIVITY_PERSONAL");
                        case 2 : Console.WriteLine("SENSITIVITY_PRIVATE");
                        case 3 : Console.WriteLine("SENSITIVITY_COMPANY_CONFIDENTIAL");


    Monday, June 23, 2014 5:00 AM
  • currently testing with exchange 2013 (Version 15.0 ‎(Build 775.38))

    I tried to do the above, which i had found here

    But I couldn't figure out how to feed it an appointment

     I use

    FindItemsResults<Appointment> findAppointmentResults = calendar.FindAppointments(cView);

    So I dont have a list of Items to use the code above

    I have tried to cast as well as creating my own 

    FindItemsResults<Item> fir = new FindItemsResults<Item>();

    but you cannot Add the appointment objects because its not mutable

    Monday, June 23, 2014 4:17 PM
  • You may want to consider updating to SP1 and RU5 as there are a lot of fixes especially in SP1 for a number of things.

    For using LoadPropertiesForItems and FindAppointment see


    Tuesday, June 24, 2014 4:36 AM
  • I tried this

    public void loadExtendedPrivProperty(Appointment appt) {
                ExtendedPropertyDefinition PR_SENSITIVITY = new ExtendedPropertyDefinition(0x0036, MapiPropertyType.Integer);
                var propertiesToLoad = new PropertySet(BasePropertySet.FirstClassProperties) { RequestedBodyType = Microsoft.Exchange.WebServices.Data.BodyType.Text };
                    Int32 SensVal = 0;
                    appt.TryGetProperty(PR_SENSITIVITY, out SensVal);
                //            case 0: Console.WriteLine("SENSITIVITY_NONE");
                //            case 1: Console.WriteLine("SENSITIVITY_PERSONAL");
                //            case 2: Console.WriteLine("SENSITIVITY_PRIVATE");
                //            case 3: Console.WriteLine("SENSITIVITY_COMPANY_CONFIDENTIAL");

    however the SensVal is always 2 (provided it was originally set to Private/2)

    Can you test this?  Is this a bug with EWS?

    It seems that once an Appointment gets set to Private, it will never change even if the Appointment is editted and that property is changed.


    I also installed CU5 on the Exchange server.  So it should be up to date now.

    Wednesday, June 25, 2014 4:20 PM
  • I can't reproduce the issue your having (not on office365 anyway), have you tried looking at the raw properties in a Mapi editor life MFCMapi configured with a profile in Online mode ? this is ultimate test because you will see to properties in real time, ews is just reading those same store properties.

    If your using the Managed API to read the values of that property are you reloading the Item when the change is made eg say if you read the property from an Item with the Managed API and then went into OWA and made a change to that Item you will need to reload the Item (eg do a GetItem or Load) again with the managed API to see the change. The Managed API's strongly typed object won't show changes in real-time you always need to use the Load() method to cause the API to perform an operation to get the updated data from the server.


    Thursday, June 26, 2014 12:24 AM
  • the code above shows the .Load being called, is that not what your referring to?  And isnt that extended property quering the mapi directly?  it seems to parse correctly (values are what they should be, prior to any modifications to the appointment)

    I tried to work with MFCMapi but couldnt get it configured on the server nor on my personal machine.  

    • Edited by owen gerig Sunday, June 29, 2014 2:23 PM
    Sunday, June 29, 2014 2:23 PM
  • >>the code above shows the .Load being called, is that not what your referring to?

    Yes but my point is that you need to call this every time you want to read the updated information. EWS, Outlook and OWA all read the same properties you should be able to configured an Outlook profile against your Exchange server to test MFCMapi with. Have you just tried testing it with Outlook instead of OWA ? .     


    Monday, June 30, 2014 5:54 AM
  • (sorry for late reply).  i have not tested it with outlook

    and the call to load is called every time prior to the use/checking of that private flag

    Monday, July 7, 2014 4:26 PM