Access public/shared calendar via EWS API and create appointments

1k views Asked by At

How to access a public shared calendar(with owner permission) to create appointments using EWS Java API? I am only able to create appointments in my private calendar using my credentials:

Appointment appointment = new Appointment(service);
appointment.save();

I tried to follow https://stackoverflow.com/a/23773834/3673638 and created:

Folder myPublicFoldersRoot = Folder.bind(service, WellKnownFolderName.PublicFoldersRoot);
FolderId folderId = myPublicFoldersRoot.getId();
appointment.save(folderId);

But that resulted in NullPointerException with error@ microsoft.exchange.webservices.data.ServiceResponseException: Meeting requests and cancellations can't be sent for calendar items located in public folders.

0

There are 0 answers