Bulk restore deleted users in Azure Active Directory
Azure Active Directory (Azure AD), part of Microsoft Entra, supports bulk user restore operations and supports downloading lists of users, groups, and group members.
Understand the CSV template
Download and fill in the CSV template to help you successfully restore Azure AD users in bulk. The CSV template you download might look like this example:
CSV template structure
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: The format of the column headings is <Item name> [PropertyName] <Required or blank>. For example,
Object ID [objectId] Required. Some older versions of the template might have slight variations.
- Examples row: We have included in the template a row of examples of acceptable values for each column. You must remove the examples row and replace it with your own entries.
- The first two rows of the upload template must not be removed or modified, or the upload can't be processed.
- The required columns are listed first.
- We don't recommend adding new columns to the template. Any additional columns you add are ignored and not processed.
- We recommend that you download the latest version of the CSV template as often as possible.
To bulk restore users
Sign in to your Azure AD organization with an account that is a User administrator in the Azure AD organization.
In Azure AD, select Users > Deleted.
On the Deleted users page, select Bulk restore to upload a valid CSV file of properties of the users to restore.
Open the CSV template and add a line for each user you want to restore. The only required value is ObjectID. Then save the file.
On the Bulk restore 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 restores the users.
When the restore 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 page.
Next, you can check to see that the users you restored exist in the Azure AD organization either in the Azure portal or by using PowerShell.
View restored users in the Azure portal
- Sign in to the Azure AD admin center 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 and verify that the users you restored are listed.
View users with PowerShell
Run the following command:
Get-AzureADUser -Filter "UserType eq 'Member'"
You should see that the users that you restored are listed.