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 affecteduser@domain.com).errors.errordetail.objecterrors.errorrecord| 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 user@domain.com -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 user@domain.com |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 user@domain.com).errors.errordetail.objecterrors.errorrecord| fl

Please follow and like us:

2 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.

    Thanks!

    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 onmicrosoft.com 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.

Leave a Reply

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