Skip to content

Commit d002fb8

Browse files
Add outlook calendargroup get command. Closes #7111
Made-with: Cursor
1 parent bc374af commit d002fb8

File tree

5 files changed

+590
-0
lines changed

5 files changed

+590
-0
lines changed
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
import Global from '../../_global.mdx';
2+
import Tabs from '@theme/Tabs';
3+
import TabItem from '@theme/TabItem';
4+
5+
# outlook calendargroup get
6+
7+
Retrieves a calendar group for a user.
8+
9+
## Usage
10+
11+
```sh
12+
m365 outlook calendargroup get [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. 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+
31+
<Global />
32+
33+
## Permissions
34+
35+
<Tabs>
36+
<TabItem value="Delegated">
37+
38+
| Resource | Permissions |
39+
|-----------------|----------------------------------------------------------------------------------------|
40+
| Microsoft Graph | Calendars.ReadBasic, Calendars.Read, Calendars.Read.Shared, Calendars.ReadWrite.Shared |
41+
42+
</TabItem>
43+
<TabItem value="Application">
44+
45+
| Resource | Permissions |
46+
|-----------------|-------------------------------------|
47+
| Microsoft Graph | Calendars.ReadBasic, Calendars.Read |
48+
49+
</TabItem>
50+
</Tabs>
51+
52+
::::note
53+
54+
When using delegated permissions, specifying `userId` or `userName` for a different user requires the `Calendars.Read.Shared` or `Calendars.ReadWrite.Shared` scope. When the specified user matches the signed-in user, no shared scope is needed.
55+
56+
::::
57+
58+
## Examples
59+
60+
Get the calendar group specified by name for the signed-in user.
61+
62+
```sh
63+
m365 outlook calendargroup get --name "Personal Events"
64+
```
65+
66+
Get the calendar group specified by name for a user using application permissions.
67+
68+
```sh
69+
m365 outlook calendargroup get --name "Personal Events" --userId "44288f7d-7710-4293-8c8e-36f310ed2e6a"
70+
```
71+
72+
Get the calendar group specified by id for a user using application permissions.
73+
74+
```sh
75+
m365 outlook calendargroup get --id "AAMkAGVmMDEzMTM4LTZmYWUtNDdkNC1hMDZiLTU1OGY5OTZhYmY4OABGAAAAAAAiQ8W967B7TKBjgx9rVEURBwAiIsqMbYjsT5e-T7KzowPTAAAAAAEMAAAiIsqMbYjsT5e-T7KzowPTAAABuC34AAA=" --userId "44288f7d-7710-4293-8c8e-36f310ed2e6a"
76+
```
77+
78+
## Response
79+
80+
<Tabs>
81+
<TabItem value="JSON">
82+
83+
```json
84+
{
85+
"id": "id-value",
86+
"name": "name-value",
87+
"changeKey": "changeKey-value",
88+
"classId": "classId-value"
89+
}
90+
```
91+
92+
</TabItem>
93+
<TabItem value="Text">
94+
95+
```text
96+
id | name
97+
------------------------------------------------------------------ ----------------
98+
id-value name-value
99+
```
100+
101+
</TabItem>
102+
<TabItem value="CSV">
103+
104+
```csv
105+
id,name
106+
id-value,name-value
107+
```
108+
109+
</TabItem>
110+
<TabItem value="Markdown">
111+
112+
```md
113+
# outlook calendargroup get
114+
115+
Date: 3/20/2026
116+
117+
Property | Value
118+
---------|-------
119+
id | id-value
120+
name | name-value
121+
```
122+
123+
</TabItem>
124+
</Tabs>
125+

docs/src/config/sidebars.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,6 +1308,11 @@ const sidebars: SidebarsConfig = {
13081308
type: 'doc',
13091309
label: 'calendargroup list',
13101310
id: 'cmd/outlook/calendargroup/calendargroup-list'
1311+
},
1312+
{
1313+
type: 'doc',
1314+
label: 'calendargroup get',
1315+
id: 'cmd/outlook/calendargroup/calendargroup-get'
13111316
}
13121317
]
13131318
},

src/m365/outlook/commands.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const prefix: string = 'outlook';
22

33
export default {
44
CALENDARGROUP_LIST: `${prefix} calendargroup list`,
5+
CALENDARGROUP_GET: `${prefix} calendargroup get`,
56
MAIL_SEARCHFOLDER_ADD: `${prefix} mail searchfolder add`,
67
MAIL_SEND: `${prefix} mail send`,
78
MAILBOX_SETTINGS_GET: `${prefix} mailbox settings get`,

0 commit comments

Comments
 (0)