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

how to read or delete appointment as an Attendee #363

Open buddha1990 opened 9 years ago

buddha1990 commented 9 years ago

Hello, My scenario is to do GET and DELETE (from his calendar to deleted items folder) appointment as an attendee.

  1. Using attendee credentials, I created the service
  2. Now using that service and item Id, i'm binding the appointment
  3. While binding, it is throwing following error : microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException: Access is denied. Check credentials and try again.

Is there any way to go about this issue?

serious6 commented 9 years ago

That should not be possible. As creation / deletion in ones calendar is restricted to the persons explicitly allowed to do so. If you want to cancel a meeting as an attendee you are able to decline that you are part of that appointment. If selected, the owner will be notified about this.

pranjaljain commented 9 years ago

Hi @serious6 , The issue here is, it is throwing following error : microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException: while doing bind of appointment. Suppose as an attendee if I want to accept or decline a meeting, what I will do is: Appointment appointment = Appointment.Bind(service, new ItemId("AAMkA=")); appointment.accept(true);

But, it throws error on first line only.

Regards, Pranjal

serious6 commented 9 years ago

you need to connect to the attendees calendar and accept that appointment there. It will then have another uniqueId. As said the attendee is not allowed to manipulate the owners calendar and items if no impersonation or delegated access is configured.

pranjaljain commented 9 years ago

thanks a lot @serious6 .