Unable to delete mailboxes in Exchange Online

Emirhan Cakir 0 Reputation points
2024-06-19T18:22:59.0233333+00:00

Hi Everyone,

I really need help because we've been struggling this issue for more than 2 months.

This is happening for the first time. I created an AD User 2 months ago and it created 2 duplicate mailboxes on Exchange Online. I am trying to hide from GAL but it says "Operation failed". I tried to delete the mailbox by using Powershell. But it keeps saying "The operation couldn't be performed because matches multiple entries". I don't know what to do at this point. I also deleted the user from AD completely but that didn't help as well. Mailboxes are still there.

Any solution would be appreciated.

Thank you

Microsoft Exchange Online
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,131 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Vasil Michev 99,106 Reputation points MVP
    2024-06-20T06:37:03.3+00:00

    Use the GUID of the mailbox when trying the delete operation.

    0 comments No comments

  2. Yanhong Liu 4,495 Reputation points Microsoft Vendor
    2024-06-20T09:41:57.05+00:00

    Hello,

    Thank you for posting in Q&A forum.

    This issue occurs because there are two or more mailboxes with the same name in Exchange Online.

    To delete these duplicate mailboxes, you need to first find their distinguishedName (DN), and then delete them using PowerShell.You can try running a command in PowerShell to solve the issue.

    1.Open the Exchange Management Shell (EMS)

    2.Run the following command to find mailboxes with the same name:

    Get-Mailbox -ResultSize Unlimited | Group-Object -Property UserPrincipalName | Where-Object {$_.Count -gt 1}

    This will display all email accounts with the same UserPrincipalName.

    3.For each duplicate mailbox, run the following command to get its distinguishedName (DN):

    Get-Mailbox -Identity "Mailbox name" | Select-Object -ExpandProperty DistinguishedName

    Replace "Mailbox Name" with the actual mailbox name.

    4.Delete a mailbox with a specific distinguishedName (DN) using the following command:

    Remove-Mailbox -Identity "Mailbox DN" -Confirm: $false

    Replace "Mailbox DN" with the actual distinguishedName.

    Repeat steps 3 and 4 until all duplicate mailboxes have been deleted.

    I hope the information above is helpful.

    Best Regards,

    Yanhong Liu

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments