Calling getter of Appointment Throws Exception If Fetched Without ViewPrivateItems To Target Calendar RRS feed

  • Question

  • I have one account called DATA_FETCH_ACCOUNT and user account USER_ACCOUNT.

    DATA_FETCH_ACCOUNT has author permission of calendar of USER_ACCOUNT.

    Currently, I use findItems() API to fetch items of USER_ACCOUNT (WebCredentials is DATA_FETCH_ACCOUNT).

    Once items are returned, I will load item properties (ExchangeService.loadPropertiesForItems()). When I try to get body of one item (Appointment.getBody()), exception is thrown (microsoft.exchange.webservices.data.core.exception.service.local.ServiceObjectPropertyException: You must load or assign this property before you can read its value.)

    I found out that if ViewPrivateItems of USER_ACCOUNT is open (true), everything is fine. Therefore, is it a solution to above problem ?

    Can it be set via ECP of on-premise exchange server ? (currently I configure it via powershell, but I hope there could be another easy way.)

    Would it be possible to not throw exception and return some basic information, e.g datetime, status like GetUserAvailability() API ? Then, I can handle it more gracefully.

    Please advice.


    Tommy Chu

    • Edited by Tommy Chu Wednesday, May 9, 2018 3:05 AM
    Wednesday, April 18, 2018 4:16 AM

All replies