Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
Permalink
main
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
title description services author ms.author manager ms.date ms.topic ms.service ms.subservice ms.workload ms.custom ms.reviewer ms.collection
Bulk delete users in the Azure Active Directory portal | Microsoft Docs
Delete users in bulk in the Azure admin center in Azure Active Directory
active-directory
barclayn
barclayn
amycolannino
06/24/2022
how-to
active-directory
enterprise-users
identity
it-pro
jeffsta
M365-identity-device-management

Bulk delete users in Azure Active Directory

Using the admin center in Azure Active Directory (Azure AD), part of Microsoft Entra, you can remove a large number of members to a group by using a comma-separated values (CSV) file to bulk delete users.

CSV template structure

The CSV file contains names and IDs of the users to delete

The rows in a downloaded CSV template are as follows:

  • Version number: The first row containing the version number must be included in the upload CSV.
  • Column headings: User name [userPrincipalName] Required. Older versions of the template might vary.
  • Examples row: We have included in the template an example of an acceptable value. Example: chris@contoso.com You must remove the example row and replace it with your own entries.

Additional guidance

  • The first two rows of the template must not be removed or modified, or the template can't be processed.
  • The required columns are listed first.
  • Don't add new columns to the template. Any additional columns you add are ignored and not processed.
  • Download the latest version of the CSV template before making new changes.

To bulk delete users

  1. Sign in to your Azure AD organization with an account that is a User administrator in the organization.
  2. In Azure AD, select Users > Bulk operations > Bulk delete.
  3. On the Bulk delete user page, select Download to download the latest version of the CSV template.
  4. Open the CSV file and add a line for each user you want to delete. The only required value is User principal name. Save the file.
  5. On the Bulk delete user page, under Upload your csv file, browse to the file. When you select the file and click submit, validation of the CSV file starts.
  6. When the file contents are validated, you’ll see File uploaded successfully. If there are errors, you must fix them before you can submit the job.
  7. When your file passes validation, select Submit to start the Azure bulk operation that deletes the users.
  8. When the deletion operation completes, you'll see a notification that the bulk operation succeeded.

If there are errors, you can download and view the results file on the Bulk operation results page. The file contains the reason for each error.

Check status

You can see the status of all of your pending bulk requests in the Bulk operation results page.

Check delete status in the Bulk Operations Results page.

Next, you can check to see that the users you deleted exist in the Azure AD organization either in the Azure portal or by using PowerShell.

Verify deleted users in the Azure portal

  1. Sign in to the Azure portal with an account that is a User administrator in the organization.
  2. In the navigation pane, select Azure Active Directory.
  3. Under Manage, select Users.
  4. Under Show, select All users only and verify that the users you deleted are no longer listed.

Verify deleted users with PowerShell

Run the following command:

Get-AzureADUser -Filter "UserType eq 'Member'"

Verify that the users that you deleted are no longer listed.

Next steps