Deleting a user in Microsoft 365

An employee leaves and you want to remove their account from Microsoft 365. There are two steps worth knowing: a soft delete, after which you can still restore the account for 30 days, and a hard delete, after which it's gone for good. This article explains the difference and how to do both.

Before you delete

Soft delete

  1. Go to admin.microsoft.com > Users > Active users.
  2. Select the user > Delete user.
  3. Choose what happens with the mailbox and OneDrive, and confirm.

The account now sits under Deleted users for 30 days. You can bring it back with Restore, including mailbox and licences.

Deleting a user in the Microsoft 365 admin center

Hard delete

Want to remove the account permanently right away, for example to reuse the same name?

  1. Go to entra.microsoft.com > Users > Deleted users.
  2. Select the user and choose Delete permanently.

With PowerShell: Connect-MgGraph -Scopes User.ReadWrite.All, then Remove-MgDirectoryDeletedItem -DirectoryObjectId <id>.

Note: after a hard delete you can't restore the account. The mailbox is gone, unless a retention policy or litigation hold applies: then it becomes an inactive mailbox.

Synced users

Does the user come from on-premises Active Directory? Delete them there or remove them from sync scope. Otherwise they'll come back at the next sync.

Related: recover deleted emails and restore deleted OneDrive files.

Read also

Recover deleted emails in Outlook and Exchange Online
Restore deleted OneDrive files up to 93 days after deletion
Set up Full Access, Send As and Send on Behalf in Exchange Online

Nederlandstalige versie: Een gebruiker verwijderen in Microsoft 365: soft delete en hard delete


More in English