Skip to main content

aad o365group remove

Removes an Microsoft 365 Group

Usage

m365 aad o365group remove [options]

Options

-i, --id <id>

The ID of the Microsoft 365 Group to remove

--confirm

Don't prompt for confirming removing the group

--skipRecycleBin

Set to directly remove the group without moving it to the Recycle Bin

-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

If the specified id doesn't refer to an existing group, you will get a Resource does not exist error.

Examples

Remove group with id 28beab62-7540-4db1-a23f-29a6018a3848. Will prompt for confirmation before removing the group

m365 aad o365group remove --id 28beab62-7540-4db1-a23f-29a6018a3848

Remove group with id 28beab62-7540-4db1-a23f-29a6018a3848 without prompting for confirmation

m365 aad o365group remove --id 28beab62-7540-4db1-a23f-29a6018a3848 --confirm

Remove group with id 28beab62-7540-4db1-a23f-29a6018a3848 without prompting for confirmation and without moving it to the Recycle Bin

m365 aad o365group remove --id 28beab62-7540-4db1-a23f-29a6018a3848 --confirm --skipRecycleBin