Office 365 User Validation Error [Failed to Sync the ArchiveGuid]

|
| TechPress-KBID-270
Home » Azure Active Directory » Office 365 User Validation Error [Failed to Sync the ArchiveGuid]

Recently came across an issue on Office 365 Portal after clicking on a users with archiving enabled. The Users 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.

Solution

I) Connect to Exchange Online PowerShell

https://docs.microsoft.com/en-gb/powershell/exchange/exchange-online/connect-to-exchange-online-powershell/connect-to-exchange-online-powershell?view=exchange-ps

II) Next step is to find all effected users. This can be done using a simple command:

Get-MsolUser -HasErrorsOnly
(Get-MsolUser -UserPrincipalName [email protected]).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

III) 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

IV) 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

V) Now open your Active Directory and Users console. We will need to make 4 changes to each effected user. 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. 

a) [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.

b) Now we will need to use the Value from step IV (Hexadecimal Value) to be filled in the msExchArchiveGUID

c) 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.

d) Last item to edit is msExchRemoteRecipientType to the value of 3

VI) 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

VII) 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

Important Points and 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.

Leave a Reply