Exchange EWS ErrorCalendarIsNotOrganizer despite being the organizer - exchange-server

I'm trying to cancel a meeting I created by using an EWS XML CreateItem request (against a 2013 server):
<ns2:CreateItem MessageDisposition="SendAndSaveCopy"><ns2:Items>
<ns1:CancelCalendarItem>
<ns1:ReferenceItemId Id="AAMkA...." ChangeKey="DwAAA..."/>
</ns1:CancelCalendarItem>
</ns2:Items></ns2:CreateItem>
So far so good, however Outlook denies me access with the ResponseCode "ErrorCalendarIsNotOrganizer" / "User must be an organizer for CancelCalendarItem action".
A look in the event detail by using GetItem with BaseShape=ALL_PROPERTIES reveals that the account I use is set as Organizer, however at the same time:
the IsOrganizer field is set to false
in EffectiveRights the fields Read, Modify and Delete are true.
I can delete the appointment lateron using a DeleteItem request and it works, however it only removes the appointment from the room's calendar but not from the mailboxes of the attendees.
What causes this? There is no impersonation in use, only the service account I use has delegation access to every room mailbox (to be able to see all appointments).

I can delete the appointment lateron using a DeleteItem request and it works, however it only removes the appointment from the room's calendar but not from the mailboxes of the attendees.
It sounds like your accessing the appointment in the Room Mailboxes calendar ? this is why even if your using the account that is the organizer of that appointment the isOrganizer will return as false because this property is only true on the copy of the Appointment in the Organizers calendar. To correctly cancel the meeting you need to do that on the calendar of the Organizer (not the rooms or any attendee instance of the meeting). This will still only delete the appointment in the organizer calendar and send cancellation messages to the attendees.
An important point is that all instances of the meeting stored in the Attendees and Meeting Room calendars are separate Exchange Store items with no direct link. So deleting the organizer instance (or any attendee instance) has no affect on the other attendees instances these must be processed separately by the attendees themselves based on the cancellation message that is received.

Related

Organizer does not receive email notification when attendee declines the event

We use a service account to authenticate google calendar and programmatically create calendars and appointment events. However, when a customer declines an event, there's no notification whatsoever of the decline and we cannot find any email regarding the decline in the admin or organizer's email inbox. is it because the service account is a dummy user? How can we get the organizer to be tied to an actual email account so people can get notification of the response status of the attendee?
We tried
create the calendar and event programmatically, attendee declines, no notification (despite setSendNotification("all") in the API call)
create the calendar and event programmatically, move the organizer to a different calendar (new organizer), attendee declines, no notification for the new organizer (despite setSendNotification("all") in the API call)
update code
googleAPIHelper.executeWithThrottling(service.events().update(calendarId, remoteEvent.getId(), remoteEvent).setSendUpdates("all"), Event.class);
insert code
googleAPIHelper.executeWithThrottling(service.events().insert(calendarId, eventToInsert).setSendUpdates("all"), Event.class);
move organizer code
googleAPIHelper.executeWithThrottling(service.events().move(calendarId, remoteEvent.getId(), destinationCalendarId), Event.class);
As it turned out, for each calendar the organizer owns (found in "Other Calendars"), we have to toggle the "Other notifications" settings to receive an email (i.e. Event responses). The default is set to "None."
E.g.
See also: https://www.youtube.com/watch?v=wgbpsm82AaY

Event created on delegate calendar via EWS is not visible to the delegated user

I have 2 outlook users. Consider A & B. A has calendar (a) and B has calendar (b).
User B has given user A delegate access to calendar (b).
Now, using EWS API, when user A is creating event on calendar (b), the event is visible to user B only.
The same is not true for Microsoft Graph. If user A is creating event in calendar (b) then the event is visible to both the users.
I am not sure if it is the expected behavior or it's an issue.
Now, using EWS API, when user A is creating event on calendar (b), the event is visible to user B only.
What do you mean by Event is this an appointment or Meeting, if its a meeting you should be creating it in the organizers calendar A and inviting B, if its an appointment then if you want it to exist in both calendar then you will need to create it in both. Mailboxes are the boundaries so all your doing in both instance is creating an object in one store for it to be in the other store you need to either send and Invitation and have that accepted or create the object itself in both stores. What your seeing is the expected behavior (and what you would see if you just did it manually in Outlook or OWA)

Exchange Calendar Events for all users in my organization

Is there a way to subscribe to all NEW calendar entries create by all users in my organization? Basically, whenever anyone in my organization creates a meeting invite, my app needs to be notified.
Our app needs this to work for both Exchange Online and On-premise.
Is there a way to subscribe to all NEW calendar entries create by all users in my organization?
No Subscriptions and always in the context of a Mailbox or Mailbox Folder (you need to consider your mailboxes will be spread across different servers in different data-centers)
As a workaround you could create a Transport Rule that catches any Meeting invitations and redirect them to a particular mailbox. Then just subscribe to events on that mailbox.

End Event on Room Resource calendar

The problem that I face: I currently use a product that displays calendar items on an iPad outside of conference rooms. I have all the room resources set up and everything works brilliantly except if I try to end the event early from this display.
The reason it doesn't end: When User A schedules a meeting and adds the room Conference Room as a resource, and Conference Room accepts, the meeting is still owned by the organizer, or in this case User A. Because of this, the room itself can not edit times on an event, only the organizer can.
The question: Is there any way, to have the Room auto accept the meeting, and also be able to edit the event?
Please note, I have tried this with Exchange 2007, Exchange 2010, Exchange 2013, and Office 365. The servers have been both on-premises and hosted.
No the only valid editor of a Meeting is the organizer for the reason that each copy of the meeting stored in the Attendees mailboxes is a separate item in the Exchange Mailstore. Eg Even if the Organizer modifies the appointment and doesn't send out Meeting updates the changes they make won't show on the attendees (or Room Mailbox) calendar until the updates are sent and accepted. This is fundamental to the way in which Appointments work if you need to change a meeting for some reason you may want to look at impersonating the Owner of the Appointment in EWS. The one thing the Room mailbox (or any attendee) could do is propose a new meeting time which would be a separate message that would sent back to the Organizer who then once they accepted would send out a normal Meeting update to all attendees.
Cheers
Glen

Use exchange web services managed API to subscribe to notification when appointment has started

How can I subscribe to a notification that will trigger every time that an appointment has started?
This is not possible, since Exchange does care about appointments in user mailbox. For the store, it's just an element with a bunch of properties.
What you can do is create a service which checks a users mailbox, retrieves all appointments and triggers an event once an appointment has started. Additionally, you can subscribe for notifications so that your application is informed by the Exchange server when an item in the users mailbox changes.

Resources