Skip to content

aad user recyclebinitem restore

Restores a user from the recycle bin in the current tenant

Usage

m365 aad user recyclebinitem restore [options]

Options

--id <id>
ID of the deleted user.
-h, --help [help]
Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, response, full. Default is full.
--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples
-o, --output [output]
Output type. json,text,csv,md. Default json
--verbose
Runs command with verbose logging
--debug
Runs command with debug logging

Remarks

Important

To use this command you must be a Global administrator, User administrator or Privileged Authentication administrator

Note

After running this command, it may take a minute before the user will reappear in the active users.

Examples

Restore user from the recycle bin

m365 aad user recyclebinitem restore --id 990e2425-f595-43bc-85ed-b89a44093793

Response

{
  "id": "990e2425-f595-43bc-85ed-b89a44093793",
  "businessPhones": [],
  "displayName": "John Doe",
  "givenName": "John",
  "jobTitle": "Sales Manager",
  "mail": null,
  "mobilePhone": null,
  "officeLocation": null,
  "preferredLanguage": "nl-BE",
  "surname": "Doe",
  "userPrincipalName": "john.doe@contoso.com",
}
businessPhones   : []
displayName      : John Doe
givenName        : John
id               : 990e2425-f595-43bc-85ed-b89a44093793
jobTitle         : Sales Manager
mail             : null
mobilePhone      : null
officeLocation   : null
preferredLanguage: nl-BE
surname          : Doe
userPrincipalName: john.doe@contoso.com
id,businessPhones,displayName,givenName,jobTitle,mail,mobilePhone,officeLocation,preferredLanguage,surname,userPrincipalName
990e2425-f595-43bc-85ed-b89a44093793,[],John Doe,John,Sales Manager,,,,nl-BE,Doe,john.doe@contoso.com
# user recyclebin restore --id 990e2425-f595-43bc-85ed-b89a44093793

Date: 16/02/2023

## John Doe (990e2425-f595-43bc-85ed-b89a44093793)

Property | Value
---------|-------
id | 990e2425-f595-43bc-85ed-b89a44093793
businessPhones | []
displayName | John Doe
givenName | John
jobTitle | Sales Manager
mail | null
mobilePhone | null
officeLocation | null
preferredLanguage | nl-BE
surname | Doe
userPrincipalName | john.doe@contoso.com