Usage
m365 aad user remove [options]
Description
Removes a specific user
Options
| Option |
Description |
--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. |
--confirm |
Don't prompt for confirmation. |
Examples
Removes a specific user by id
m365 aad user remove --id a33bd401-9117-4e0e-bb7b-3f61c1539e10
Removes a specific user by its UPN
Default properties
No response
Additional Info
API info: https://learn.microsoft.com/en-us/graph/api/user-delete?view=graph-rest-1.0&tabs=http
Let's specify in the docs which roles you need to remove a user:
- User Administrator
- Privileged Authentication Administrator
- Global Administrator
Usage
m365 aad user remove [options]
Description
Removes a specific user
Options
--id [id]idoruserNamebut not both.--userName [userName]idoruserNamebut not both.--confirmExamples
Removes a specific user by id
Removes a specific user by its UPN
Default properties
No response
Additional Info
API info: https://learn.microsoft.com/en-us/graph/api/user-delete?view=graph-rest-1.0&tabs=http
Let's specify in the docs which roles you need to remove a user: