How Administrators Can Remove Meetings On Behalf Of Users

Use Remove-CalendarEvents to Cancel Teams or Regular Meetings Owned By a Specific User

The question arose about how an administrator can cancel Teams meetings scheduled by a user who is currently unavailable. Because cancelling meetings on behalf of a user is not a day-to-day administrative operation, no option is available for this purpose in the Teams admin center or the Microsoft 365 admin center. However, the Remove-CalendarEvents cmdlet in the Exchange Online management module will do the job (the cmdlet is also available for Exchange 2019).

Normally, administrators don’t interfere with meeting arrangements. Those who create meetings (the organizers) take care of scheduling and maintaining meeting settings, whether they own the calendar or are a calendar delegate. Reasons why an administrator might intervene include:

  • The organizer is unavailable for a sustained period and the need exists to rearrange the meeting.
  • The organizer has left the company.
  • The organizer is due to leave the company and part of the offboarding process involves cancellation of all their future meetings.

Mailbox Access Required

In all cases, Remove-CalendarEvents can only work if access is still available to the user’s mailbox. Exchange Online must be able to connect to the mailbox to access the organizer’s calendar to remove events. For this reason, if you plan to cancel a user’s meetings when they leave the company, the correct procedure is:

  • Sign in as with an account holding the Exchange administrator or global administrator role.
  • Revoke access to their account.
  • Run Remove-CalendarEvents to cancel all future meetings in the user’s mailbox where they are the meeting organizer and the meeting has one or more attendees (including resources like meeting rooms). Cancellations cover both normal meetings and online meetings (using Teams or another online provider). Events without attendees (appointments) are left untouched. The mailbox sends meeting cancelations to meeting participants.
  • Proceed with the remainder of the account removal process. If holds exist on the mailbox, it becomes inactive. However, you can’t cancel meetings from an inactive mailbox. If you forget to cancel meetings, restore the inactive mailbox, cancel the meetings, and then delete the mailbox again.

Running Remove-CalendarEvents

The Remove-CalendarEvents cmdlet can cancel meetings up to 1825 days (five years) in the future, which should be more than sufficient in most cases. You can perform a test run beforehand to see what meetings it will remove by including the PreviewOnly parameter. For example, this command previews what will happen if the cmdlet removes meetings from the current date up to 365 days in the future:

Remove-CalendarEvents –Identity -CancelOrganizedMeetings -QueryStartDate (Get-Date) -QueryWindowInDays 365 -PreviewOnly

Are you sure you want to perform this action?
The meeting(s) will be canceled and removed from the calendar. This action cannot be undone.
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): y
The meeting with subject "Glastonbury Meeting" and start date "09/06/2023" has been queued for cancellation.
The meeting with subject "Project X" and start date "09/06/2023" has been queued for cancellation.
The meeting with subject "Project Mercury" and start date "17/06/2023" has been queued for cancellation.
The meeting with subject "Project Botha" and start date "21/06/2023" has been queued for cancellation.
The meeting with subject "Project Botha" and start date "28/06/2023" has been queued for cancellation.

When ready to proceed, remove the PreviewOnly parameter and run the command again. Exchange Online connects to the mailbox, finds the relevant meetings, and cancels them.  Cancellation occurs immediately. Meeting participants receive a cancellation notice as normal (Figure 1).

Cancellation notice for a meeting deleted by the Remove-CalendarEvents cmdlet
Figure 1: Cancellation notice for a meeting deleted by the Remove-CalendarEvents cmdlet

Graph Delete Event API

If you need a programmatic method to remove calendar events, the Graph includes a Delete Event API. An app with the Calendars.ReadWrite application permission can connect to a mailbox, find relevant events in the calendar, and delete them.

Reduced Price for Office 365 for IT Pros

We’re on course to publish the 2024 edition of the Office 365 for IT Pros eBook on July 1. Because the 2023 book is no longer receiving updates, we have reduced its price to $35. People who buy the 2023 book will be able to upgrade to the 2024 edition at a low cost. We think this is a good deal!

7 Replies to “How Administrators Can Remove Meetings On Behalf Of Users”

  1. In my testing it appears that ALL re-occurring meetings with 1 or more participants, regardless if they fall within the day range specified by the -QueryWindowInDays parameter, will be picked up by this command. This does not appear to be intended as when I looked over the help for that parameter it states “If an instance of a recurring meeting occurs during the specified time period, the entire series is cancelled (not just the instances during the time period).”

  2. Sounds promising. Is there a similar command that would let an administrator add an owner/organizer? Frequently the meeting needs to still happen, but a new person is leading the meeting.

    1. Not that I am aware of. I guess you could use the Graph API to fetch details of the event, delete the original, and create a new event with a new organizer. The update event API doesn’t seem to handle updates of organizers.

  3. I have tried running the command but it will not show me preview of what will be cancelled. It just jumps straight to ‘confirm you want to delete entries’. I have even tried to add the -verbose switch at the end. Any advice?

    1. I just ran the cmdlet and it works as shown.

      When you run with the preview switch, the cmdlet prompts for deletion and if you answer yes, it then scans for calendar entries to remove. However, the presence of the preview switch means that the entries are not removed.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.