Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions docs/docs/cmd/outlook/calendargroup/calendargroup-remove.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
import Global from '../../_global.mdx';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# outlook calendargroup remove

Removes a calendar group.

## Usage

```sh
m365 outlook calendargroup remove [options]
```

## Options

```md definition-list
`--id [id]`
: ID of the calendar group to remove. Specify either `id` or `name`, but not both.

`--name [name]`
: Name of the calendar group to remove. Specify either `id` or `name`, but not both.

`--userId [userId]`
: ID of the user. Specify either `userId` or `userName`, but not both. This option is required when using application permissions.

`--userName [userName]`
: UPN of the user. Specify either `userId` or `userName`, but not both. This option is required when using application permissions.

`-f, --force`
: Don't prompt for confirmation.
```

<Global />

## Permissions

<Tabs>
<TabItem value="Delegated">

| Resource | Permissions |
|-----------------|----------------------|
| Microsoft Graph | Calendars.ReadWrite |

</TabItem>
<TabItem value="Application">

| Resource | Permissions |
|-----------------|----------------------|
| Microsoft Graph | Calendars.ReadWrite |

</TabItem>
</Tabs>

## Remarks

:::warning

The calendar group must be empty before it can be removed. Make sure to delete all calendars in the group first.

:::

## Examples

Remove a calendar group specified by id for the signed-in user.

```sh
m365 outlook calendargroup remove --id "AAMkAGE0MGM1Y2M5LWEzMmUtNGVlNy05MjRlLTk0YmYyY2I5NTM3ZAAuAAAAAAC_0WfqSjt_SqLtNkuO-bj1AQAbfYq5lmBxQ6a4t1fGbeYAAAAAAEOAAA="
```

Remove a calendar group specified by name for the signed-in user.

```sh
m365 outlook calendargroup remove --name "Personal Events"
```

Remove a calendar group specified by id for a user specified by id.

```sh
m365 outlook calendargroup remove --id "AAMkADIxYjJiYm" --userId "44288f7d-7710-4293-8c8e-36f310ed2e6a"
```

Remove a calendar group specified by name for a user specified by UPN without prompting for confirmation.

```sh
m365 outlook calendargroup remove --name "Personal Events" --userName "john.doe@contoso.com" --force
```

## Response

The command won't return a response on success.
5 changes: 5 additions & 0 deletions docs/src/config/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1327,6 +1327,11 @@ const sidebars: SidebarsConfig = {
type: 'doc',
label: 'calendargroup list',
id: 'cmd/outlook/calendargroup/calendargroup-list'
},
{
type: 'doc',
label: 'calendargroup remove',
id: 'cmd/outlook/calendargroup/calendargroup-remove'
}
]
},
Expand Down
1 change: 1 addition & 0 deletions src/m365/outlook/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export default {
CALENDAR_GET: `${prefix} calendar get`,
CALENDAR_REMOVE: `${prefix} calendar remove`,
CALENDARGROUP_LIST: `${prefix} calendargroup list`,
CALENDARGROUP_REMOVE: `${prefix} calendargroup remove`,
EVENT_CANCEL: `${prefix} event cancel`,
EVENT_LIST: `${prefix} event list`,
EVENT_REMOVE: `${prefix} event remove`,
Expand Down
Loading