Skip to main content
Graduate Track

Restoring a Deleted User in Microsoft Entra ID Within the 30-Day Window

Deleted a user in Microsoft Entra ID by mistake? Restore it from Deleted users within 30 days, check group memberships and licences, and avoid Delete permanently.

Restoring a Deleted User in Microsoft Entra ID Within the 30-Day Window
KBY Technologies12 min readFoundation11 min

In this lesson

Advertising disclosure: this article includes partner links. KBY may earn a commission if you sign up or buy through one, at no extra cost to you. How we make money.

Share

Before you begin

  • A test tenant or test account nobody depends on.
  • At least the User Administrator role; Groups Administrator or User Administrator to create a test group.
  • Confirmation that the test account is cloud-only and that the lab is permitted.

Track this tutorial

Choose your current status and tick each safety check as you complete it. Sign in to sync progress between devices.

Current status

Before you apply the change

Confirm these production-safety controls during the tutorial.

0 of 6 safety checks completed

To restore a deleted user in Microsoft Entra ID, sign in to the Microsoft Entra admin center as at least a User Administrator, browse to Entra ID > Users > Deleted users, select the account and choose Restore user. The key constraint is time: a deleted user stays in a suspended, soft-deleted state for 30 days, and during that window it comes back with all its properties, including its object ID, group memberships, roles, licences and application assignments. After 30 days, permanent deletion starts automatically and cannot be stopped, and Microsoft states that a permanently deleted user cannot be restored by you or by Microsoft Support.

Restoring is therefore a race against a fixed clock, but it is also a change with consequences of its own. Licences that were assigned at the time of deletion return even if none are free, and a user synchronised from on-premises Active Directory behaves differently because Microsoft Entra ID is not its source of authority. This guide builds the mental model first, then walks through a worked example and a bounded lab exercise in which you delete and restore a test account and prove, with evidence, what came back.

#Learning Objectives

  • Explain the difference between a soft-deleted and a hard-deleted user, and why the 30-day window matters.
  • Find restorable users on the Deleted users page and restore one with the least privileged role that can do it.
  • Describe what a restore preserves and the licence and synchronisation side effects it can cause.
  • Recognise the Microsoft Graph restore action and the permission it requires.
  • Verify a restore with evidence: the account is active again and its group memberships are back.

#Prerequisites

  • A test or lab Microsoft Entra tenant, or a test account in a non-production tenant that nobody depends on.
  • An account that holds at least the User Administrator role. Creating a test group needs at least Groups Administrator or User Administrator.
  • Familiarity with the Microsoft Entra admin center and the idea of users and groups.
  • Confirm with the tenant owner that deleting and restoring a test account is permitted, and that the test account is cloud-only, not synchronised from on-premises.

#Content

#
Soft delete and hard delete

A directory such as Microsoft Entra ID holds objects: users, groups, applications and others. Each object has an identifier, the object ID, that other parts of the system use to refer to it. A useful teaching model is that group membership, role assignments and application assignments point at the user object, not at its name. That is why deleting and re-creating a user is not the same as restoring one: a new account gets a new object ID, and every group, role and application assignment that referred to the old object no longer points at it.

Microsoft Entra ID handles this with two kinds of deletion. A soft delete moves the object into a suspended state: it is not available for use by other services, but it keeps its properties and can be restored for 30 days. A hard delete removes the object permanently. Deleting a user in the admin center, through Microsoft Graph or through PowerShell is a soft delete. A soft-deleted user becomes a hard-deleted one when 30 days pass without a restore, or when an administrator selects Delete permanently on the Deleted users page. Users, Microsoft 365 Groups, cloud security groups, application registrations, service principals, administrative units, Conditional Access policies and named locations support soft delete; Microsoft documents that all other object types are hard deleted and must be re-created.

#
What a restore brings back

Microsoft’s recoverability guidance states that a soft-deleted user, including an external user, keeps all its properties, including its object ID, group memberships, roles, licences and application assignments. When you restore it, that organisational information is restored with it. In practice this means the user reappears in the groups they were in and the applications they were assigned to, without anyone re-entering anything.

There are two documented side effects to plan for. First, licences that were assigned when the user was deleted are restored even if none are available. Deleting a user releases its licences for others to use, so if someone consumed them in the meantime, the restore can leave your organisation temporarily using more licences than it has bought. Second, a user synchronised from on-premises Active Directory is not owned by Microsoft Entra ID. If the account still exists on-premises, the synchronisation engine may restore it during the next synchronisation cycle; if it was deleted on-premises, a cloud restore is working against the source of authority. For synchronised users, the fix belongs in the on-premises directory.

#
Who can restore, and why the role matters

The least privileged role for the portal steps is User Administrator. For Microsoft Graph, Microsoft lists Authentication Administrator, Privileged Authentication Administrator and User Administrator as the roles that support restoring users, with the User.DeleteRestore.All permission. Restoring a user who holds a privileged administrator role needs a higher privileged role, as described in Microsoft’s list of who can perform sensitive actions. This is a deliberate trust boundary: the ability to bring back an account is the ability to bring back everything that account could do. If your organisation grants admin roles for limited periods, see how to configure Entra ID PIM for time-bound admin access, so you hold User Administrator only for the duration of the task.

#
The Graph route

The portal is the right tool for one account. Scripts and automation use the Microsoft Graph restore action, POST /directory/deletedItems/{id}/restore, where {id} is the deleted object’s ID. A successful call returns 200 OK and the restored object. Two optional body parameters matter for users: newUserPrincipalName gives the restored user a different user principal name, and autoReconcileProxyConflict, which defaults to false, tells Microsoft Entra ID to remove conflicting proxy addresses when another active user is already using one of them. The Microsoft Graph PowerShell equivalent is Restore-MgDirectoryDeletedItem -DirectoryObjectId from the Microsoft.Graph.Identity.DirectoryManagement module.

An urban alley in Seattle with graffiti-adorned walls and trash bins lining the street.
Photo by Brett Sayles on Pexels

#Examples

#
Worked example: a leaver deleted one week too early

A help desk ticket says Mary Parker, who is moving teams, cannot sign in and has vanished from her project groups. The audit log shows a Delete user event against her account four days ago. Microsoft documents that this activity is a soft delete for users; a Hard delete user event would mean the account was permanently removed. Because there is no hard-delete event and four days is inside the 30-day window, the account should be on the Deleted users page.

  1. Sign in to the Microsoft Entra admin center as at least a User Administrator.
  2. Browse to Entra ID > Users, then select Deleted users. If you do not see it, search for Deleted users in the admin center search box.
  3. Search for Mary Parker and select her account.
  4. Select Restore user.

What to notice: the account leaves the Deleted users list and appears again under All users. Because group memberships are kept during a soft delete, her project groups list her as a member again. The conclusion this evidence supports is that the same object was restored, not a look-alike account created. Before closing the ticket, check licence counts: if her licence had been reassigned, the restore may now have the organisation over its purchased number of licences.

#
Worked example: the account that will not stay restored

A second ticket concerns a synchronised user. An administrator restores the account in the cloud, but the problem returns. The documented reason is that Microsoft Entra ID is not the source of authority for synchronised users: the on-premises directory is. The right response is to find out why the account changed on-premises and fix it there, then let synchronisation do its work, rather than repeating the cloud restore.

#Exercises

#
Exercise: delete and restore a test account and prove what came back

Objective: soft delete a cloud-only test user, find it on the Deleted users page, restore it and show that its group membership survived.

Safe setup and backup: work only in a test tenant or with a test account nobody uses. Give the test user no licence and no admin role, so the restore cannot affect licence counts or privileged access. Before you start, write down the test user’s display name and user principal name and the name of the group you add it to; this record is your backup, because it is everything you would need to re-create the account if the lab went wrong.

  1. Create the test user: sign in as at least a User Administrator, browse to Entra ID > Users and select New user > Create new user. Name it, for example, Lab Restore Test. Expected result: the account appears under All users.
  2. Create a test group and add the user: browse to Entra ID > Groups > All groups, select New group, choose the Security group type with Assigned membership, and add the test user under Members. Expected result: the group’s Members list shows Lab Restore Test.
  3. Delete the user: browse to Entra ID > Users, select the test user and select Delete user. Expected result: the user no longer appears on All users.
  4. Find it: select Deleted users. Expected result: Lab Restore Test is listed as restorable.
  5. Restore it: select the user and select Restore user. Expected result: the user leaves Deleted users and appears again on All users.
  6. Check membership: open the test group’s Members list. Expected result: Lab Restore Test is a member again, without you adding it.

Pass condition: the restored user appears under All users and is a member of the test group without being re-added, which shows the original object came back rather than a new one.

Stop conditions: stop if the account you selected is not the test user, if the user is synchronised from on-premises, if it holds a licence or admin role you did not expect, or if any restore attempt returns an error. Never select Delete permanently in this exercise: a permanently deleted user cannot be restored by anyone.

Cleanup and rollback: the rollback for a restore is the original soft delete, so if a restore was wrong you can delete the account again and it returns to Deleted users for another 30 days. To clean up, delete the test user as in step 3, then browse to Entra ID > Groups > All groups, select the test group and select Delete. Both land in a soft-deleted state and are permanently deleted automatically after 30 days.

#Validation Guidance

Validate a restore at three levels, each with its own evidence. The Deleted users list proves the account was soft deleted and still inside its window. The All users list proves the restore succeeded. The group Members list, and any application the user was assigned to, proves that the references to the original object survived. If the user is in All users but missing from a group it used to be in, find out whether the group itself was deleted. The audit log does not distinguish group types: a Delete group entry could be a soft delete of a Microsoft 365 Group or cloud security group, or the hard delete of another kind of group. A hard-deleted group cannot be restored and must be re-created. In production, also check licence assignment against purchased counts after any restore.

If the user is not on Deleted users, check the audit log for a Hard delete user event. If you find one, the account cannot be restored. The documented path is to create a new user and enter the previous information again; that new account has a new object ID and needs its groups, roles and app assignments rebuilt. Users who then cannot reach an application may see AADSTS50105, user not assigned to the enterprise application, until the assignment is added back.

#Common Mistakes

Silhouette of a person inside a room reaching towards a cloudy mountain view through a window.
Photo by Shiwa Yachachin on Pexels

#
Re-creating instead of restoring

Creating a new account with the same name looks quicker but produces a different object. Groups, roles and app assignments do not follow the name. Always check Deleted users first while the window is open.

#
Selecting Delete permanently by accident

The Delete permanently option sits on the same page as Restore user. It ends the window immediately and cannot be undone, even by Microsoft Support. Read the button before you select it.

#
Restoring a synchronised user in the cloud

Microsoft Entra ID is not the source of authority for synchronised users. Fix the account on-premises, or the next synchronisation cycle decides the outcome for you.

#
Ignoring licences

Restored licences are assigned even if none are available. Check counts after a restore so you are not left out of compliance.

#
Waiting until day 30

Once the 30-day window passes, the permanent deletion process starts automatically, cannot be stopped, and management of the soft-deleted user is blocked. Restore as soon as you confirm the account is needed.

#Key Takeaways

  • A deleted user is soft deleted for 30 days and can be restored with all its properties, including its object ID, group memberships, roles, licences and app assignments.
  • Restore from Entra ID > Users > Deleted users > Restore user, as at least a User Administrator.
  • A permanently deleted user cannot be restored by anyone; a new account is a new object.
  • Licences return even if none are free, and synchronised users must be fixed on-premises.
  • Prove the restore with evidence: the user in All users and back in its groups without being re-added.

#Before You Restore an Account in Production

Treat a production restore as a change, not an undo. Confirm the request is genuine: a deleted account might have been removed because it was compromised or because the person left, and restoring it restores its access. Check that the account is cloud-only or route it to the team that owns on-premises Active Directory. Make sure you hold the least privileged role for the job, and escalate if the account held a privileged admin role, because that needs a higher role to restore. After restoring, verify group membership, application access and licence counts, and record what you restored and why in the ticket. Your rollback boundary is simple and worth knowing: a restore can be reversed by deleting the account again, which returns it to the 30-day window, but Delete permanently cannot be reversed by anyone. The next safe decision is whether the account should exist at all; if not, leave it deleted and let the window expire.

About this page

Credited to

Dates

Published

Sources

This page lists no external sources.

Corrections

No corrections are listed for this page. Some review sweeps corrected pages without naming each one; those are in the corrections log.

Reader Interaction

Comments

Add a thoughtful note on Restoring a Deleted User in Microsoft Entra ID Within the 30-Day Window. Comments are checked for spam and held for moderation before appearing.

Loading comments...

Discover more

Was this useful?

Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.

Build practical engineering skills.

Receive new lessons, learning paths, practical exercises and early-career guidance.