OfficeDev / ews-java-api

A java client library to access Exchange web services. The API works against Office 365 Exchange Online as well as on premises Exchange.
MIT License
869 stars 560 forks source link

Set action is invalid for property #513

Open ekoch opened 8 years ago

ekoch commented 8 years ago

I tried to add an attendee to an Appointment as explained in the wiki, by execute the following code:

PropertySet propSet = new PropertySet(BasePropertySet.FirstClassProperties); propSet.add(AppointmentSchema.OptionalAttendees); propSet.add(AppointmentSchema.RequiredAttendees); Appointment appointment = Appointment.bind(service, new ItemId(uniqueId), propSet); appointment.getRequiredAttendees().add("someone@somewhere.com"); appointment.update(ConflictResolutionMode.AlwaysOverwrite, SendInvitationsOrCancellationsMode.SendOnlyToAll);

And I get the following error:

microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException: Set action is invalid for property. at microsoft.exchange.webservices.data.core.response.ServiceResponse.internalThrowIfNecessary(ServiceResponse.java:278) at microsoft.exchange.webservices.data.core.response.ServiceResponse.throwIfNecessary(ServiceResponse.java:267) at microsoft.exchange.webservices.data.core.request.MultiResponseServiceRequest.execute(MultiResponseServiceRequest.java:165) at microsoft.exchange.webservices.data.core.ExchangeService.internalUpdateItems(ExchangeService.java:691) at microsoft.exchange.webservices.data.core.ExchangeService.updateItem(ExchangeService.java:762) at microsoft.exchange.webservices.data.core.service.item.Item.internalUpdate(Item.java:279) at microsoft.exchange.webservices.data.core.service.item.Appointment.update(Appointment.java:421)

Any idea why this is failing?

shibd commented 5 years ago

Have you solved the problem?