Unable to remove GuestMailUser with missing the actual Entra ID Guest User

Alex Rough 60 Reputation points
2024-12-17T20:43:03.1266667+00:00

Hello,

I encountered a problem where we imported external users and it created duplicate records of GuestMailUser in Exchange Online for the same person alex.growth@contoso.com with the identical records. It had 1 single guest user in Entra ID that we have permanently removed. Now we got 2 remaining contacts in Exchange Online and nobody is unable to send an email any more to the corresponding address. When I try to remove a user with remove-mailuser I'm getting an error saying that user is connected to a guest user in Entra ID. I checked all proxy addresses and UPN and obviously unable to locate it in the directory. When I access the user in Exchange admin center itself I see a status of "You cannot edit guest mail user here. For its management use https://portal.azure.com".
Any tips?

Microsoft Exchange Online
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,655 questions
Microsoft Exchange
Microsoft Exchange
Microsoft messaging and collaboration software.
604 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Xintao Qiao-MSFT 5,085 Reputation points Microsoft Vendor
    2024-12-18T07:52:24.6033333+00:00

    Hi, @Alex Rough

    From your description, can I understand that when you invite an external user in Azure, there are multiple identity records in the Exchange Admin Center? When you delete the user in Azure, there are still duplicate records in the Exchange Admin Center that cannot be deleted, and you also get the screenshot below?

    User's image

    Here are some steps you can try:

    1.What is the error when you use the command Remove-MailUser? You can provide screenshots for me to reproduce the issue.

    2.Try to remove the residual user from the M365 admin centre. Go to M365 admin portal->Guest users, select Residual Users, and delete them.

    3.Double-check if there are duplicate proxy addresses and UPN.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.