Bulk delete users (preview) in Azure Active Directory
Using Azure Active Directory (Azure AD) portal, you can remove a large number of members to a group by using a comma-separated values (CSV) file to bulk delete users.
To bulk delete users
Sign in to your Azure AD organization with an account that is a User administrator in the organization.
In Azure AD, select Users > Bulk delete.
On the Bulk delete user page, select Download to receive a valid CSV file of user properties.
Open the CSV file and add a line for each user you want to delete. The only required value is User principal name. Then save the file.
On the Bulk delete user (Preview) page, under Upload your csv file, browse to the file. When you select the file and click submit, validation of the CSV file starts.
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.
When your file passes validation, select Submit to start the Azure bulk operation that deletes the users.
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.
You can see the status of all of your pending bulk requests in the Bulk operation results (preview) 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
- Sign in to the Azure portal with an account that is a User administrator in the organization.
- In the navigation pane, select Azure Active Directory.
- Under Manage, select Users.
- 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.