How to Fix Duplicate Exchange Guid Errors in Office 365

When you are migrating users to office 365 you can get a lot off issues. One of these issues is when you have duplication errors in your tenant. Duplicate Exchange online Guid Errors can can generate a lot of issues. Think about duplicate accounts or Mailusers are not removable.

When you see these issues you probably do not have a clue on what to do  but actually these issues are pretty easy to fix:

Fix Duplicate Exchange Guid Errors:

This fix contains a lot of powershelling to get the error hashes and data you need to perform the action to restore this. To perform these actions with ease i recommend you install the latest versions of Powershell before you continue and make sure you have the permissions needed to continue to Duplicate Exchange Guid Errors

(Get-MsolUser -UserPrincipalName| fl

Search in EXO PowerShell for the object that is using the mentioned EXchangeGUID or ArchiveGUID:

Get-Recipient -IncludeSoftDeletedRecipients ‘ExchangeGUID value’|ft RecipientType,PrimarySmtpAddress,*WhenSoftDeleted*

Once you found the object that is using this ExchangeGUID or ArchiveGUID, you have to purge it. When you purge it you have 2 options The softdeleted mailuser removal or Usermailbox removal.

1. If it is a softdeleted MailUser:

Remove-MailUser ‘ExchangeGUID value’ -PermanentlyDelete

2. If it is a softdeleted UserMailbox, run:

Remove-Mailbox ‘ExchangeGUID value’ -PermanentlyDelete

If this command fails due to mailbox being protected by hold, you have to disable the hold first(check if data backup is required):

Set-Mailbox -LitigationHoldEnabled $false -InactiveMailbox

If it turns to be an active mailuser/mailbox that is using this ExchangeGUID/ArchiveGUID, you need to evaluate the option to purge that user. Most of the time Purging is needed to continue with the actions.

Next step after purging.

After the faulty object has been purged from EXO, we need to fix the validation error by forcing the object provisioning:

Get-MsolUser -UserPrincipalName |fl *objectID*

Redo-MsolProvisionUser -ObjectId ‘paste the *objectID* value from above command’

Wait for 5 minutes and then run the next command, to confirm if your validation error is fixed:

(Get-MsolUser -UserPrincipalName| fl

4 thoughts on “How to Fix Duplicate Exchange Guid Errors in Office 365

  1. This is a much valuable guide Jerry.
    I´m currently facing this issue, but due to the fact that the mailbox was in litigation hold and will have to be recovered, my process requires a further degree in complexity envolving the immutable ID.
    The thing is, in my humble opinion, this wasn´t supposed to happen in the first place.


    1. Hi Ivan, I have encountered these issues to. you can try the following to come to a solution, but first make sure you create a PST of the mailboxes involved.
      The first thing you can try is to remove the MSOLuser. probably this is not possible within the Gui, so you have to try this with powershell. When you are not able to do this. Try to remove the mailbox to softdeleted when the mailbox is stored there the smartest thing to do is to restore the mailbox to another user.
      The second thing is to remove all the email addresses from the user except the email ( you have to remove them from Proxyaddresses and sync the changes over).
      When you have done this you can check with. (get-msoluser (user) -hasherrorsonly). if the problem still exists..

      The actually solution is just remove the entire user in (O365 only), and sync the user as new to office 365. Make sure when performing all the steps of removing that you disable the AAD connect sync.

  2. This got me to my answer, but did not quite cover my scenario. I’m in an exchange hybrid environment where our on-prem AD server is our master record and Azure is a replication target with writeback disabled. We have an on-prem 2016 Exchange server that routes internal mail but our mailboxes live in 365.

    In order to resolve the GUID conflict (which your article showed me how to detect, thanks a bunch!) I had to use Disable-RemoteMailbox from our on-prem exchange server. Remove-RemoteMailbox deletes the user object from AD which was not what I wanted, fair warning on that one. Instead, Disable-RemoteMailbox left the user object in AD alone while removing the Exchange properties, worked like a charm.

  3. I think that is one of the most significant info for me.

    And i am glad reading your article. But wanna remark on few general
    things, The website taste is perfect, the articles is actually nice : D.
    Excellent job, cheers

Leave a Reply

Your email address will not be published. Required fields are marked *

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