Skip to main content

aad user remove

Removes a specific user


m365 aad user remove [options]


--id [id]

The ID of the user. Specify either id or userName but not both.

--userName [userName]

User principal name of the user. Specify either id or userName but not both.

-f, --force

Don't prompt for confirmation.

-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 for more information and examples.

-o, --output [output]

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


Runs command with verbose logging.


Runs command with debug logging.



If the user with the specified id or user name doesn't exist, you will get a Resource 'xyz' does not exist or one of its queried reference-property objects are not present. error.


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


After running this command, it may take a minute before the user is effectively moved to the recycle bin.


Removes a specific user by id

m365 aad user remove --id a33bd401-9117-4e0e-bb7b-3f61c1539e10

Removes a specific user by its UPN

m365 aad user remove --userName


The command won't return a response on success.