I'm developing an automatic meeting cancellation. I have a Superuser that can cancel meetings which were created in the name of a meeting room. But this Superuser can't cancel meeting created from the name of a simple employee.
I'm using Exchange 2010.
I tried do cancel meeting using impersonation, but still received errors. There were 2 types of errors:
Access is denied. Check credentials and try again.
User must be an organizer for CancelCalendarItem action
I do a request as a superuser:
...
<soap:Body>
<m:CreateItem MessageDisposition="SendOnly">
<m:Items>
<t:CancelCalendarItem>
...
</t:CancelCalendarItem>
...
I receive a response:
...
<m:ResponseMessages>
<m:CreateItemResponseMessage ResponseClass="Error">
<m:MessageText>User must be an organizer for CancelCalendarItem action.</m:MessageText>
...
I expect that Superuser could cancel a meeting, organized by an employee.
Is it possible? If it is, than what permission must Superuser be granted?
The only person that can cancel a Meeting is the Organizer (which is why you get the error that you do). If you have EWS Impersonation rights then you will need to impersonate the Organizer and then Cancel the copy of the Appointment that is in the Organizer mailbox. You can't use the instance of the appointment from an attendee or Meeting room.
Related
ENVIORNMENT
Outlook Desktop (Office 365);
Exchange Server;
Azure Cloud
INITIAL CONDITIONS
USER_A is USER_B's assistant and manages USER_B's calendar (Outlook Shared Calendar). We would like to track the changes in USER_B's calendar. In Outlook/Exchange speak, USER_A is a delegate of USER_B.
GOAL
When certain Outlook Calendar Items are modified, we'd like to call a Function App which will update a database. The calendar could be a Shared Calendar, but not necessarily a shared Calendar.
USE CASE
USER_B is not logged in, but USER_A creates an appointment in USER_B's calendar.
Even though USER_B is not logged in, we'd like to capture the change made by USER_A and update our database. In other words, a change notification should fire for the shared calendar, even though the owner of that calendar is not logged in.
QUESTION
Does the Function App need "App" level permissions to do this?
Would the code look something like:
POST https://graph.microsoft.com/v1.0/subscriptions
Content-type: application/json
{
"changeType": "created",
"notificationUrl": "https://webhook.azurewebsites.net/api/send/UpdateDataBase",
"resource": "users/{a-user-id}/events",
"expirationDateTime":"2020-10-20T19:23:45.9376913Z",
"clientState": "bigSecret",
"latestSupportedTlsVersion": "v3"
}
In order to get change notification in shared calendars, "Application" level permissions are required.
I found this here How to subscribe calendar event if calendar is given delegated permission using ms-graph api
I have a web app that allows receptionists to create calendar events on Outlook/Office365. To manage the events I use Microsoft Graph. The app sends the Graph requests under his own identity, because I need it to have no user interaction for logging in, so it uses Client_ID and Client_Secret with administrator rights to do everything. I can create events on the calendars of any user in the organization, which kinda works like creating an event "On behalf of", but there's a problem. When you create an event in someone else's calendar, Outlook will send the invitations as the calendar's owner, and this means that if the owner doesn't have permission to send messages to a mailbox (for example, a room mailbox), the invitation will never arrive. I need it to send the invitations from another user account (the receptionist that creates the event), like Office 365 does when you create an event on a shared calendar. Is that possible? Or is there any workaround to accomplish what I need?
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.
For my code to run I need to fetch all the meeting cancellations from a shared mailbox.
I just discovered, those meeting cancellations are only send by the respective outlook client, when the meeting, which is about to be cancelled, is in the future. If the meeting is in the past, it is just deleted from the organizers mailbox and remains in the mailboxes from all other attendees.
Is there any option on the exchange server or outlook client, which allows me to have the organizer send a meeting cancellation message to all attendees, even if the meeting is in the past?
We're using Exchange Server 2013.
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