I recently encountered an issue on the Microsoft 365 Portal when checking the account Information of a user with archiving enabled. The user’s account properties pane displayed an error message at the top of the screen. Please note that the GUIDs and Correlation ID may differ in your specific case. The error message is as follows:
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 synchronized from your On-prem Active Directory to Entra ID, and you either have a local Exchange server or have decommissioned the Exchange server, you may see issues related to certain user account attributes, which can be the root cause of this problem.
Steps to Fix Error
Launch the Powershell console as an administrator on a Windows 10/11 device and follow below steps:
- Install Exchange Online Powershell and MSOnline Powershell module
Install-Module ExchangeOnlineManagement
Install-Module MSOnline
- Import Exchange Online Powershell and MSOnline Powershell module
Import-Module ExchangeOnlineManagement
Import-Module MSOnline
- Connect to MSOnline
Connect-ExchangeOnline
Connect-MsolService
- List all the users with this error.
Get-Msoluser -HasErrorsOnly
- Check more information about the error for a particular user using the below command. Replace [email protected] with the affected user’s UPN.
(Get-MsolUser -UserPrincipalName u[email protected]).errors.errordetail.objecterrors.errorrecord | fl
- Now, you will need to get the ‘ArchiveGuid‘ and the ‘ArchiveName‘ from the affected user. To do this, execute the following command (replace ‘UserPrincipleName’ with the UserPrincipleName from the affected user).
Get-Mailbox UserPrincipleName | FL Archive*
Alternative Command:
Get-MsolUser -HasErrorsOnly | select -ExpandProperty Userprincipalname | get-mailbox | ft Name, ArchiveGuid, ArchiveName
- Copy the ‘ArchiveGuid‘ and execute the following command, replacing the ‘ArchiveGuid’ with the value obtained previously. This command will convert the GUID to hexadecimal.
[system.guid]$guid = "ArchiveGuid" ($Guid.ToByteArray() | foreach { $_.ToString('x2') }) -Join ' '
OR
- I have compiled the customized ‘All in One‘ command below. This command will provide the ‘UserName,’ ‘ArchiveGUID,’ ‘ArchiveGUID – HEX Value,’ and ‘ArchiveName’ from the cloud mailbox. You can use these values to populate or replace attributes in the Local Active Directory Users.
Get-MsolUser -HasErrorsOnly | select -ExpandProperty Userprincipalname | get-mailbox | Select Name, ArchiveGuid, @{L='ArchiveGUID - HEXVALUE' ; expression={($_.ArchiveGuid.ToByteArray() | foreach {$_.ToString('x2') }) -Join ' '}}, ArchiveName
- Now, open your Active Directory Users and Computers console. We will need to make 4 changes to each affected user account.
- Open the properties of the affected user in AD and navigate to the ‘Attribute Editor‘ If you do not see that option, you will need to enable ‘Advanced Features‘ from the ‘View‘ menu in the console.
Its recommended to change these values using Exchange Admin Center (EAC) or the Exchange Management Shell (EMS). Modifying 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 is NOT supported by Microsoft.
Note
- The first step is to populate ‘mailNickname.’ You can find the ‘mailNickname‘ from the user account, which is usually the same as everything before the ‘@‘ symbol in the email address.
- You will need to use the ArchiveGuid value from step 7 (the Hexadecimal Value) to fill in the ‘msExchArchiveGUID‘”.
- Copy the ‘ArchiveName‘ value obtained in Step 6 and populate it into the ‘msExchArchiveName‘ without the brackets. If there is already an existing value, replace it.
- The last item to edit is ‘msExchRemoteRecipientType‘ to the value of 3.
- Now, we will need to synchronize the changes to Entra ID using the Entra Connect server, either force a Delta sync using the following command or simply wait for 30 minutes.
Start-ADSyncSyncCycle -PolicyType Delta
- After you’ve reviewed all affected users, run the command below again to verify and ensure that there are no users left with errors.
Connect-MsolService
Get-MsolUser -HasErrorsOnly
Further Troubleshooting
If you still encounter the same error even after updating the attribute values and waiting for 30 minutes following the delta sync, or if you are experiencing the issue as shown in the screenshot below, please ensure the following:
- Confirm that the ‘mailNickName,’ ‘mail,’ ‘msExcharchiveguid,’ and ‘msExchArchiveName’ attributes are syncing to Entra ID.
- Start an Initial synchronization to Entra ID using the command ‘Start-ADSyncSyncCycle -PolicyType Initial‘ to trigger a full synchronization. Please wait for the replication to complete and then recheck for the issue.
Conclusion
In this blog post, I have demonstrated how to resolve the ‘Failed to Sync the ArchiveGuid‘ error in Microsoft 365. The solution involves updating user attributes in the on-premises Active Directory and running an Entra Connect Delta Sync. I have successfully troubleshooted this issue, and I hope this solution works for you as well.
Great How-To, thank you for that!
Works!
You’r Welcome Marcel. I am glad that it helped.
Thanks for taking your time to create this document, it worked for me.
No Problem Marc. Thanks for the feedback.