Why does Exchange Online say a mailbox object can’t be found?

0
2
Asked By MellowCedar47 On

I'm running Exchange Online PowerShell and trying to remove the calendars for disabled users with Remove-CalendarEvents. I copied the user's GUID from Microsoft 365/Azure, but Exchange returns an error saying the object couldn't be found on an Outlook server. I get the same result when using the user's UPN or email address, and Get-Mailbox also can't locate it. What could cause this if the user still appears in the directory?

3 Answers

Answered By AmberQuill39 On

The GUID may still exist in Azure while the Exchange mailbox has already been removed. In this case, the license had been removed when the account was disabled, which deleted the mailbox. Reassigning an appropriate Exchange Online license recreated the mailbox, after which Remove-CalendarEvents worked. Check the user’s Exchange licensing and mailbox status before running the cleanup command.

Answered By NovaPine62 On

Try the command with -PreviewOnly first. It won’t make changes, but it can confirm whether Exchange recognizes the mailbox and show what the command would process. If PreviewOnly fails with the same object-not-found message, the issue is mailbox availability rather than the calendar-removal parameters.

MellowCedar47 -

PreviewOnly produced the same error, so it looks like Exchange couldn’t resolve the object at all.

Answered By QuietHarbor8 On

First verify that Exchange Online can actually resolve the object with Get-Mailbox -Identity . Being present in Azure or Microsoft 365 doesn’t necessarily mean the user still has an Exchange mailbox. Also make sure you’re using the mailbox identity that Remove-CalendarEvents expects, rather than a directory-only object ID.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

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