How to fix Failed to Sync the ArchiveGuid in Office 365

Failed to Sync the ArchiveGuid

Recently came across an issue on Office 365 Portal after clicking on a users with archiving enabled. The User’s account properties pane was showing an error message on the top of the screen. The error message is mentioned below. Please note the guid’s and correlation Id may be different in your case.

Exchange: Failed to sync the ArchiveGuid 00000000-0000-0000-0000-000000000000 of mailbox 5d3475-987d-128b-8322b-803ujf33437c because one cloud archive ryb432303-f639-423e3-8edsb-1a9hebfyfd85 exists.; Exchange: An unknown error has occurred. Refer to correlation ID: 6bhrkmnr-7777-4a81-bf09-60jkfd376fba85; Exchange: An unknown error has occurred. Refer to correlation ID: 6b757fdfkld7777-4a81-bf09-6dshdeennrba85; Exchange: An unknown error has occurred. Refer to correlation ID: 6jdksjkds76bf-7777-4a81-bfskjds-6090ejkejba85

When you have users synced from local Active Directory to Azure Active Directory and you have a local exchange server or you have decommissioned the exchange server, you may see that there are issues with few attributes which can cause this issue.

How to fix Failed to Sync the ArchiveGuid error for Office 365 user

  1. Connect to Exchange Online PowerShell.
$mycred = Get-Credential <Global Administrator User ID> 
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $mycred -Authentication Basic -AllowRedirection 
Import-PSSession $Session
  1. Next step is to find all affected users. This can be done using a simple command
Get-MsolUser -HasErrorsOnly (Get-MsolUser -UserPrincipalName user@domain.com).errors.errordetail.objecterrors.errorrecord | fl

First Use Connect-MsolService and then use the command Get-Msoluser -HasErrorsOnly. If you cannot find the command Connect-MsolService, You may be missing the module MSOnline on your machine. MSOnline Powershell Module Download Link.

Failed to Sync the ArchiveGuid
  1. Now we will need to get the ArchiveGuid and the ArchiveName from the affected user. So, run the following command (Replace UserPrincipleName with the UserPrincipleName from the affected user in step II).
Get-Mailbox UserPrincipleName | FL Archive* OR you can also use below command Get-MsolUser -HasErrorsOnly | select -ExpandProperty Userprincipalname | get-mailbox | ft Name, ArchiveGuid, ArchiveName
Failed to Sync the ArchiveGuid
  1. Copy the ArchiveGuid and run the following command, replacing the ArchiveGuid with the value from step III. This command will convert the Guid to Hexadecimal.
[system.guid]$guid = "ArchiveGuid" ($Guid.ToByteArray() | foreach { $_.ToString('x2') }) -Join ' '

OR 

I have put together below customized All in One command.  This will provide UserNameArchiveGUIDArchiveGUID – HEX Value and ArchiveName from the cloud mailbox which you can use to populate or replace the values in Local Active Directory Users Attributes.

Get-MsolUser -HasErrorsOnly | select -ExpandProperty Userprincipalname | get-mailbox | Select Name, ArchiveGuid, @{L='ArchiveGUID - HEXVALUE' ; expression={($_.ArchiveGuid.ToByteArray() | foreach {$_.ToString('x2') }) -Join ' '}}, ArchiveName
Failed to Sync the ArchiveGuid
  1. Now open your Active Directory and Users console. We will need to make 4 changes to each effected user account. Open properties of the effected user in AD and go to Attribute Editor (If you do not see that option, you will need to enable Advanced Features from the View menu in the console).
Important Note
The only supported way to change these values are using the Exchange Admin Center (EAC) or using the Exchange Management Shell (EMS). Modifications to these attributes using standard PowerShell, the Attribute Editor in Active Directory Users and Computers or using the ADSIEdit snap-in or third-party management tools are NOT supported. 
  1. [Ignore if its already updated] First step is to fill the mailNickName. Fill in the mailNickname from the user, this is usually the same as everything before the @ in the email-address.
  2. Now we will need to use the Value from step IV (Hexadecimal Value) to be filled in the msExchArchiveGUID.
  3. 5.3 Next we will need to grab the ArchiveName from step III, and fill this into the msExchArchiveName without the brackets. If there is already a value existing, Replace it.
  4. 5.4 Last item to edit is msExchRemoteRecipientType to the value of 3.
  1. Now we will need to synchronize the made changes to Office 365. From your AD Connect server force a Delta sync using the following command, or just wait 30 minutes.
Start-ADSyncSyncCycle -PolicyType Delta
  1. Once the issues are fixed. Run below command again to check and make sure that there are no users left with errors.
Connect-MsolService Get-MsolUser -HasErrorsOnly
Failed to Sync the ArchiveGuid

Further Troubleshooting

In case you still see the same error even after updating the attribute values and you have waited for 30 minutes after running the delta sync or You are seeing the issue as shown in below screenshot then please make sure 1) mailNickName, mail, msExcharchiveguid and msExchArchiveName attributes are getting synced to Azure AD and 2) run an initial Sync to Azure AD using command Start-ADSyncSyncCycle -PolicyType Initial to start Full Synchronization to Azure Active Directory. Please wait for the replication to complete and check again.

Conclusion

In this blog post, we have seen how you can Failed to Sync the ArchiveGuid error in Office 365. You need to update the attributes of the user in On premise Active Directory and run a Azure AD connect Delta Sync. I have been able to troubleshoot this issue successfully. Hope this solution works for you as well.

4 thoughts on “How to fix Failed to Sync the ArchiveGuid in Office 365”

Leave a Comment