Practical PowerShell: Restore an Entra ID Deleted User Account and Update Its User Principal Name
The need to restore deleted user accounts sometimes arises. The process is well understood and options are available to do the job in the Entra and Microsoft 365 admin centers. But if you need to restore a deleted user account and change its user principal name, that operation can only be done with PowerShell. This article explores why updating a user principal name during a restore might be necessary and the code to restore accounts.
March 4, 2025