Support
 
PhoneGet Quote
 
Support
 
US Sales: +1 888 720 9500
US Support: +1 844 245 1108
Intl: +1 925 924 9500
Aus: +1 800 631 268
UK: 0800 028 6590
CN: +86 400 660 8680

Direct Inward Dialing: +1 408 916 9890

 
 

How to clean up unmanaged Microsoft Entra accounts?

Microsoft Entra user accounts created in unmanaged tenants or viral tenants will still have access after they leave your organization. It is important to clean up these accounts to ensure data security.

The steps below will help you clean up unmanaged Microsoft Entra accounts using the MSIdentityTools PowerShell module.

Run the following cmdlets:

  • Install-Module Microsoft.Graph -Scope CurrentUser
  • Install-Module MSIdentityTools
  • Import-Module msidentitytools,microsoft.graph

To identify unmanaged Microsoft Entra accounts, run:

  • Connect-MgGraph -Scope User.Read.All
  • Get-MsIdUnmanagedExternalUser

To reset unmanaged Microsoft Entra account redemption status, run:

  • Connect-MgGraph -Scopes User.ReadWriteAll
  • Get-MsIdUnmanagedExternalUser | Reset-MsIdExternalUser

To delete unmanaged Microsoft Entra accounts, run:

  • Connect-MgGraph -Scopes User.ReadWriteAll
  • Get-MsIdUnmanagedExternalUser | Remove-MgUser

Manage Entra ID objects in bulk using M365 Manager Plus

M365 Manager Plus is an extensive Microsoft 365 tool used for reporting, managing, monitoring, auditing, and creating alerts for critical incidents. With M365 Manager Plus, you can:

  • Perform bulk operations like password resets and account unlock without using PowerShell scripts.
  • Report and audit with over 700 pre-packaged reports to track changes and get better visibility on your services.
  • Automate routine tasks like user provisioning, stale group cleanup, and mailbox management operations.
  • Monitor the health of Microsoft 365 services and get notified on critical activities and outages.
  • Create custom granular roles to delegate Microsoft 365 administration to technicians.

One-stop solution for your Microsoft 365 management needs.

Try now for free

  • Streamline your Microsoft 365 governance and administration with M365 Manager Plus

Related Resources

A holistic Microsoft 365 administration and security solution
 
x