- Root Cause #1 — Stale on-premises `msExchMailboxGuid` / `msExchArchiveGuid`: When HR re-enables a former employee's on-premises AD account, it still carries the old `ExchangeGuid` or `ArchiveGuid` from years ago—which either collides with an existing Inactive Mailbox or tells Exchange Online that a mailbox already lives on-premises!
- Root Cause #2 — `ValidationError` in Entra / EXO: Check `Get-User
| Select -ExpandProperty ProvisioningErrors` or `Get-MgUser -UserId -Property ServiceProvisioningErrors` to see the exact conflicting GUID. - The Safe Fix: Decide first whether the rehire needs their old Inactive Mailbox back (`New-Mailbox -InactiveMailbox` or `Set-User -PermanentlyClearPreviousMailboxInfo`) or a brand-new clean mailbox.
One of the most common Exchange Online Hybrid tickets happens when a former employee is rehired: IT re-enables their on-premises Active Directory account (or creates a new account with the same UPN), assigns a Microsoft 365 E3/E5 license, waits two hours—and no mailbox ever provisions in Exchange Online.
This runbook walks through diagnosing the exact provisioning error in Microsoft Graph and Exchange Online, clearing conflicting PreviousMailboxGuid / ArchiveGuid / msExchMailboxGuid attributes, and getting the rehired user's mailbox live cleanly.
1. Step 1: Read the Exact Provisioning Error (Graph & Exchange Online)
# 1. Check Microsoft Graph ServiceProvisioningErrors
Connect-MgGraph -Scopes "User.Read.All" -NoWelcome
$u = Get-MgUser -UserId "[email protected]" -Property DisplayName, UserPrincipalName, ServiceProvisioningErrors
$u.ServiceProvisioningErrors | Format-List
# 2. Check Exchange Online PreviousMailboxGuid & RecipientType
Connect-ExchangeOnline -ShowBanner:$false
Get-User -Identity "[email protected]" |
Select-Object DisplayName, RecipientType, RecipientTypeDetails, PreviousRecipientTypeDetails, PreviousMailboxGuid
# 3. Check if an Inactive Mailbox still holds the user's old ExchangeGuid
Get-EXOMailbox -InactiveMailboxOnly -Filter "PrimarySmtpAddress -eq '[email protected]'" |
Select-Object DisplayName, ExchangeGuid, ArchiveGuid, WhenSoftDeleted
2. Step 2: Provision a Brand-New Clean Mailbox for the Rehire
If the rehired employee should start with a brand-new empty mailbox (leaving their old Inactive Mailbox preserved separately for compliance/eDiscovery):
# 1. In Exchange Online PowerShell: clear the stale PreviousMailboxInfo link
Set-User -Identity "[email protected]" -PermanentlyClearPreviousMailboxInfo -Confirm:$false
# 2. In On-Premises Active Directory (Hybrid): clear stale ExchangeGuid / ArchiveGuid if still stamped
Set-ADUser -Identity "rehire" -Clear msExchMailboxGuid, msExchArchiveGuid
# 3. Ensure the on-prem object is a proper RemoteMailbox (msExchRemoteRecipientType = 1)
# (If not already a RemoteMailbox, run Enable-RemoteMailbox)
Start-ADSyncSyncCycle -PolicyType Delta
# 4. After Exchange Online provisions the new mailbox (~15 mins), copy the new ExchangeGuid back on-premises!
$newGuid = (Get-EXOMailbox -Identity "[email protected]").ExchangeGuid
# On-premises EMS:
# Set-RemoteMailbox -Identity "rehire" -ExchangeGuid $newGuid
3. Step 3: Fixing Failed to sync the ArchiveGuid Errors
If ServiceProvisioningErrors reports:
Failed to enable the new cloud archive ... because a different ArchiveGuid is synced from on-premises
Compare (Get-EXOMailbox "[email protected]").ArchiveGuid against the on-premises AD attribute msExchArchiveGuid. Update on-premises Set-RemoteMailbox -Identity "rehire" -ArchiveGuid <CloudArchiveGuid> (or clear msExchArchiveGuid if no cloud archive exists) and run Start-ADSyncSyncCycle -PolicyType Delta.
For full inactive mailbox recovery workflows when a rehire does need their historical emails restored, see our Inactive Mailboxes in Exchange Online PowerShell Runbook.
💬 Reader Comments & Feedback
Did this runbook help, or did Microsoft change a cmdlet or UI menu? Share your feedback below.
Leave a Comment or Report an Update