An account has been placed in deleted users (which contains the users mail) but a new account has been synced to 365 with the same email address.
This could be caused by an IAM Cloud sync problem or the user could have been accidently or purposely deleted from active users.
As the user accounts have the same email address you need to remove the newly created one from active users into deleted users and restore the original.
This happened at Corsham after a recent outage:
First we need to rename the new account in active users. You can do this in Azure PowerShell with the command:
PS C:\WINDOWS\system32> connect-msolservice
PS C:\WINDOWS\system32> Set-MsolUserPrincipalName -UserPrincipalName email@example.com -NewUserPrincipalName firstname.lastname@example.org
So what I did was place a '1' after the name in the email address. In the example above it would be:
Set-MsolUserPrincipalName -UserPrincipalName email@example.com -NewUserPrincipalName firstname.lastname@example.org
You can check it has worked by running get-msoluser -userprincialname email@example.com
You need to delete this account from active users with Remove-MsolUser -UserPrincipalName firstname.lastname@example.org
Restore the account from deleted users
On HFIM run a full import full sync on the customers 365 connector:
This joins the account to the one in FIM. Double check it in the meta verse search. If it's a big customer check with a senior member of the team first if a full import full sync can be run during working hours.
Once the customer has confirmed all is ok delete the account from the recycle bin in 365 using Remove-MsolUser -UserPrincipalName email@example.com -RemoveFromRecycleBin