Azure Active Directory User Account Hard Matching
Cause:
– Deleted On-Premise User Account (which you have restored but will not Sync up with Azure and/or Office 365).
Solution:
Install Azure Powershell Modules – https://docs.microsoft.com/en-us/powershell/azure/overview?view=azurermps-5.4.0
Connect to Office 365 using Powershell – https://docs.microsoft.com/en-us/office365/enterprise/powershell/connect-to-office-365-powershell
Before doing this, ensure the account in question is not being synced from AD to Azure. Move the account into a non-synced OU first.
(perform the below from a local domain controller)
$credential = Get-Credential
Connect-MsolService -Credential $credential
$ADUser = “username”
$365User = “[email protected]“
$guid =(Get-ADUser $ADUser).Objectguid
$immutableID=[system.convert]::ToBase64String($guid.tobytearray())
Set-MsolUser -UserPrincipalName “$365User” -ImmutableId $immutableID