Error when you try to remove a user from the recycle bin: Remove-MsolUser User Not Found

Original product version:   Office 365 Identity Management, Microsoft Entra ID, Cloud Services (Web roles/Worker roles), Microsoft Intune, Azure Backup
Original KB number:   3019157

Symptoms

When you try to remove a user from the recycle bin (also sometimes known as the Deleted Users container) in a Microsoft cloud service such as Microsoft Office 365, Microsoft Intune, or Microsoft Azure, you receive the following error message:

Remove-MsolUser: User Not Found

For example, you experience these symptoms when you run the following cmdlet:

Remove-MsolUser -RemoveFromRecyleBin

Note

Azure AD and MSOnline PowerShell modules are deprecated as of March 30, 2024. To learn more, read the deprecation update. After this date, support for these modules are limited to migration assistance to Microsoft Graph PowerShell SDK and security fixes. The deprecated modules will continue to function through March, 30 2025.

We recommend migrating to Microsoft Graph PowerShell to interact with Microsoft Entra ID (formerly Azure AD). For common migration questions, refer to the Migration FAQ. Note: Versions 1.0.x of MSOnline may experience disruption after June 30, 2024.

Cause

This problem occurs if the user who is performing the action is not a global admin.

Resolution

Take one of the following actions:

  • Have someone assign the global admin role to you, and then remove the user from the recycle bin.
  • Have a global admin remove the user from the recycle bin.
  • Wait 30 days. Deleted users will remain in the recycle bin for 30 days. After 30 days, they are automatically removed from the recycle bin.

Contact us for help

If you have questions or need help, create a support request, or ask Azure community support. You can also submit product feedback to Azure feedback community.