Skip to main content

entra user recyclebinitem restore

Restores a user from the recycle bin in the current tenant

Usage

m365 entra user recyclebinitem restore [options]

Alias

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 options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Remarks

info

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 entra 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",
}
CTRL + M