Skip to content

Commit 0d52a95

Browse files
Adds command ´outlook calendargroup set´
1 parent 879da87 commit 0d52a95

File tree

5 files changed

+605
-0
lines changed

5 files changed

+605
-0
lines changed
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
import Global from '../../_global.mdx';
2+
import Tabs from '@theme/Tabs';
3+
import TabItem from '@theme/TabItem';
4+
5+
# outlook calendargroup set
6+
7+
Updates a calendar group for a user.
8+
9+
## Usage
10+
11+
```sh
12+
m365 outlook calendargroup set [options]
13+
```
14+
15+
## Options
16+
17+
```md definition-list
18+
`--id [id]`
19+
: ID of the calendar group. Specify either `id` or `name`, but not both.
20+
21+
`--name [name]`
22+
: Name of the calendar group. 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.
26+
27+
`--userName [userName]`
28+
: UPN of the user. Specify either `userId` or `userName`, but not both.
29+
30+
`--newName <newName>`
31+
: New name of the calendar group.
32+
```
33+
34+
<Global />
35+
36+
## Permissions
37+
38+
<Tabs>
39+
<TabItem value="Delegated">
40+
41+
| Resource | Permissions |
42+
|-----------------|----------------------------------------|
43+
| Microsoft Graph | Calendars.ReadWrite, Calendars.ReadWrite.Shared |
44+
45+
</TabItem>
46+
<TabItem value="Application">
47+
48+
| Resource | Permissions |
49+
|-----------------|----------------------|
50+
| Microsoft Graph | Calendars.ReadWrite |
51+
52+
</TabItem>
53+
</Tabs>
54+
55+
:::note
56+
57+
When using delegated permissions, specifying `userId` or `userName` for a different user requires the `Calendars.ReadWrite.Shared` scope. When the specified user matches the signed-in user, no shared scope is needed.
58+
59+
:::
60+
61+
## Examples
62+
63+
Update the calendar group specified by name for the current user.
64+
65+
```sh
66+
m365 outlook calendargroup set --name "Personal Evts" --newName "Personal Events"
67+
```
68+
69+
Update the calendar group specified by id for a user.
70+
71+
```sh
72+
m365 outlook calendargroup set --id "AAMkADIxYjJiYm" --newName "Personal Events" --userId "44288f7d-7710-4293-8c8e-36f310ed2e6a"
73+
```
74+
75+
Update the calendar group specified by name for a user specified by email.
76+
77+
```sh
78+
m365 outlook calendargroup set --name "Personal Evts" --newName "Personal Events" --userName "john.doe@contoso.com"
79+
```
80+
81+
## Response
82+
83+
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
@@ -1327,6 +1327,11 @@ const sidebars: SidebarsConfig = {
13271327
type: 'doc',
13281328
label: 'calendargroup list',
13291329
id: 'cmd/outlook/calendargroup/calendargroup-list'
1330+
},
1331+
{
1332+
type: 'doc',
1333+
label: 'calendargroup set',
1334+
id: 'cmd/outlook/calendargroup/calendargroup-set'
13301335
}
13311336
]
13321337
},

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_SET: `${prefix} calendargroup set`,
89
EVENT_CANCEL: `${prefix} event cancel`,
910
EVENT_LIST: `${prefix} event list`,
1011
EVENT_REMOVE: `${prefix} event remove`,

0 commit comments

Comments
 (0)