Skip to content

Commit 4b728d9

Browse files
Adds command outlook calendargroup remove
1 parent 71c58f3 commit 4b728d9

5 files changed

Lines changed: 574 additions & 0 deletions

File tree

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
import Global from '../../_global.mdx';
2+
import Tabs from '@theme/Tabs';
3+
import TabItem from '@theme/TabItem';
4+
5+
# outlook calendargroup remove
6+
7+
Removes a calendar group.
8+
9+
## Usage
10+
11+
```sh
12+
m365 outlook calendargroup remove [options]
13+
```
14+
15+
## Options
16+
17+
```md definition-list
18+
`--id [id]`
19+
: ID of the calendar group to remove. Specify either `id` or `name`, but not both.
20+
21+
`--name [name]`
22+
: Name of the calendar group to remove. Specify either `id` or `name`, but not both.
23+
24+
`--userId [userId]`
25+
: ID of the user. Specify either `userId` or `userName`, but not both. This option is required when using application permissions.
26+
27+
`--userName [userName]`
28+
: UPN of the user. Specify either `userId` or `userName`, but not both. This option is required when using application permissions.
29+
30+
`-f, --force`
31+
: Don't prompt for confirmation.
32+
```
33+
34+
<Global />
35+
36+
## Permissions
37+
38+
<Tabs>
39+
<TabItem value="Delegated">
40+
41+
| Resource | Permissions |
42+
|-----------------|----------------------|
43+
| Microsoft Graph | Calendars.ReadWrite |
44+
45+
</TabItem>
46+
<TabItem value="Application">
47+
48+
| Resource | Permissions |
49+
|-----------------|----------------------|
50+
| Microsoft Graph | Calendars.ReadWrite |
51+
52+
</TabItem>
53+
</Tabs>
54+
55+
## Remarks
56+
57+
:::warning
58+
59+
The calendar group must be empty before it can be removed. Make sure to delete all calendars in the group first.
60+
61+
:::
62+
63+
## Examples
64+
65+
Remove a calendar group specified by id for the signed-in user.
66+
67+
```sh
68+
m365 outlook calendargroup remove --id "AAMkAGE0MGM1Y2M5LWEzMmUtNGVlNy05MjRlLTk0YmYyY2I5NTM3ZAAuAAAAAAC_0WfqSjt_SqLtNkuO-bj1AQAbfYq5lmBxQ6a4t1fGbeYAAAAAAEOAAA="
69+
```
70+
71+
Remove a calendar group specified by name for the signed-in user.
72+
73+
```sh
74+
m365 outlook calendargroup remove --name "Personal Events"
75+
```
76+
77+
Remove a calendar group specified by id for a user specified by id.
78+
79+
```sh
80+
m365 outlook calendargroup remove --id "AAMkADIxYjJiYm" --userId "44288f7d-7710-4293-8c8e-36f310ed2e6a"
81+
```
82+
83+
Remove a calendar group specified by name for a user specified by UPN without prompting for confirmation.
84+
85+
```sh
86+
m365 outlook calendargroup remove --name "Personal Events" --userName "john.doe@contoso.com" --force
87+
```
88+
89+
## Response
90+
91+
The command won't return a response on success.

docs/src/config/sidebars.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,6 +1328,11 @@ const sidebars: SidebarsConfig = {
13281328
label: 'calendargroup list',
13291329
id: 'cmd/outlook/calendargroup/calendargroup-list'
13301330
},
1331+
{
1332+
type: 'doc',
1333+
label: 'calendargroup remove',
1334+
id: 'cmd/outlook/calendargroup/calendargroup-remove'
1335+
},
13311336
{
13321337
type: 'doc',
13331338
label: 'calendargroup set',

src/m365/outlook/commands.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export default {
55
CALENDAR_GET: `${prefix} calendar get`,
66
CALENDAR_REMOVE: `${prefix} calendar remove`,
77
CALENDARGROUP_LIST: `${prefix} calendargroup list`,
8+
CALENDARGROUP_REMOVE: `${prefix} calendargroup remove`,
89
CALENDARGROUP_SET: `${prefix} calendargroup set`,
910
EVENT_CANCEL: `${prefix} event cancel`,
1011
EVENT_LIST: `${prefix} event list`,

0 commit comments

Comments
 (0)