Home

Cancel / Remove Calendar items for account that no longer exists

%3CLINGO-SUB%20id%3D%22lingo-sub-171800%22%20slang%3D%22en-US%22%3ECancel%20%2F%20Remove%20Calendar%20items%20for%20account%20that%20no%20longer%20exists%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-171800%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20have%20a%20user%20that%20started%20with%20us%20a%20couple%20of%20months%20ago%2C%20and%20when%20her%20account%20was%20first%20created%20our%20outsourced%20IT%20partners%20set%20her%20email%20up%20using%20the%26nbsp%3B%40onmicrosoft%26nbsp%3B%20email%20address%20instead%20of%20the%20company%20domain.%20Besides%20the%20simple%20fix%20to%20simply%20adjust%20this%2C%20our%20IT%20partners%20decided%20in%20their%20wisdom%20to%20delete%20her%20old%20account%20and%20create%20a%20new%20one%20(insert%20facepalm%20icon%20here).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20problem%20is%20that%20she%20had%20some%20meetings%20booked%20(some%20recurring%2C%20some%20one-offs)%20in%20rooms%20and%20with%20other%20team%20members%20using%20her%20old%20account.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOur%20IT%20partners%20have%20contacted%20Microsoft%20after%20apparently%20attempting%20to%20find%20a%20solution%20and%20were%20advised%20by%20Microsoft%20that%20there%20is%20no%20way%20of%20using%20a%20script%20to%20query%20EOL%20and%20remove%20those%20entries.%26nbsp%3B%20I%20have%20to%20say%2C%20I%20find%20this%20hard%20to%20believe%2C%20so%20I'm%20turning%20to%20this%20community%20group%20to%20ask%20if%20it%20is%20at%20all%20possible%20to%20query%20and%20remove%20stale%2Forphaned%20meetings%20that%20have%20been%20created%20using%20this%20old%2C%20deleted%20account.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20have%20looked%20into%20the%20'Remove-CalendarEvents'%20cmdlet%20as%20well%20as%20various%20'Get-Mailbox'%20scripts%20I%20found%20dotted%20around%20the%20web%2C%20none%20of%20which%20seemed%20to%20do%20the%20job.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECan%20anyone%20advise%20on%20this%2C%20and%20whether%20in%20fact%20it%20is%20possible%20or%20not%3F%20Strikes%20me%20as%20something%20that%20could%20happen%20fairly%20often%20in%20businesses%20all%20over%20the%20world%20each%20and%20every%20day%3F%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-171800%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExchange%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-171834%22%20slang%3D%22en-US%22%3ERe%3A%20Cancel%20%2F%20Remove%20Calendar%20items%20for%20account%20that%20no%20longer%20exists%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-171834%22%20slang%3D%22en-US%22%3E%3CP%3ERemove-CalendarEvents%20will%20only%20work%20if%20the%20user%20object%20still%20exists.%20You%20can%20use%20Search-mailbox%20to%20target%20all%20items%20created%20by%20that%20account%2C%20however%20using%20this%20method%20you%20can%20only%20delete%20them%2C%20not%20cancel%20the%20actual%20meetings.%26nbsp%3BSome%20EWS-based%20script%20can%20also%20be%20used%26nbsp%3Bwith%20the%20same%20effect.%26nbsp%3BFor%20proper%20cancellation%20however%2C%20you%20need%20to%20either%20be%20the%20organizer%2C%20or%20be%20able%20to%20impersonate%20the%20organizer.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Deleted
Not applicable

Hi, 

We have a user that started with us a couple of months ago, and when her account was first created our outsourced IT partners set her email up using the @onmicrosoft  email address instead of the company domain. Besides the simple fix to simply adjust this, our IT partners decided in their wisdom to delete her old account and create a new one (insert facepalm icon here).

 

The problem is that she had some meetings booked (some recurring, some one-offs) in rooms and with other team members using her old account. 

 

Our IT partners have contacted Microsoft after apparently attempting to find a solution and were advised by Microsoft that there is no way of using a script to query EOL and remove those entries.  I have to say, I find this hard to believe, so I'm turning to this community group to ask if it is at all possible to query and remove stale/orphaned meetings that have been created using this old, deleted account.

 

I have looked into the 'Remove-CalendarEvents' cmdlet as well as various 'Get-Mailbox' scripts I found dotted around the web, none of which seemed to do the job.

 

Can anyone advise on this, and whether in fact it is possible or not? Strikes me as something that could happen fairly often in businesses all over the world each and every day? 

1 Reply

Remove-CalendarEvents will only work if the user object still exists. You can use Search-mailbox to target all items created by that account, however using this method you can only delete them, not cancel the actual meetings. Some EWS-based script can also be used with the same effect. For proper cancellation however, you need to either be the organizer, or be able to impersonate the organizer.

Related Conversations
Calendar not available for older AD accounts
_jancis in Microsoft Teams on
0 Replies
Windows 10 Email & App accounts settings
RahamimL in Windows 10 on
1 Replies
Viewing a Teams Calendar on Outlook app on android/ios
jnolan in Microsoft Teams on
18 Replies
Duplicate Calendar Invites Sent
Jake Smith in Office 365 on
7 Replies
Unable to create calendar event from taskbar
LokePus in Windows Insider Program on
9 Replies