Skip to content

Commit 0848f68

Browse files
Adds command outlook calendargroup get. Closes #7111
1 parent 7843715 commit 0848f68

4 files changed

Lines changed: 586 additions & 0 deletions

File tree

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 |
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": "AAMkAGE0MGM1Y2M5LWEzMmUtNGVlNy05MjRlLTk0YmYyY2I5NTM3ZAAuAAAAAAC_0WfqSjt_SqLtNkuO-bj1AQAbfYq5lmBxQ6a4t1fGbeYAAAAAAEOAAA=",
86+
"name": "My Calendars",
87+
"changeKey": "nfZyf7VcrEKLNoU37KWlkQAAA0x0+w==",
88+
"classId": "0006f0b7-0000-0000-c000-000000000046"
89+
}
90+
```
91+
92+
</TabItem>
93+
<TabItem value="Text">
94+
95+
```text
96+
id name
97+
----------------------------------------------------------------------------------------------------------------------- ----------------
98+
AAMkAGE0MGM1Y2M5LWEzMmUtNGVlNy05MjRlLTk0YmYyY2I5NTM3ZAAuAAAAAAC_0WfqSjt_SqLtNkuO-bj1AQAbfYq5lmBxQ6a4t1fGbeYAAAAAAEOAAA= My Calendars
99+
```
100+
101+
</TabItem>
102+
<TabItem value="CSV">
103+
104+
```csv
105+
id,name
106+
AAMkAGE0MGM1Y2M5LWEzMmUtNGVlNy05MjRlLTk0YmYyY2I5NTM3ZAAuAAAAAAC_0WfqSjt_SqLtNkuO-bj1AQAbfYq5lmBxQ6a4t1fGbeYAAAAAAEOAAA=,My Calendars
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 | AAMkAGE0MGM1Y2M5LWEzMmUtNGVlNy05MjRlLTk0YmYyY2I5NTM3ZAAuAAAAAAC_0WfqSjt_SqLtNkuO-bj1AQAbfYq5lmBxQ6a4t1fGbeYAAAAAAEOAAA=
120+
name | My Calendars
121+
```
122+
123+
</TabItem>
124+
</Tabs>
125+

src/m365/outlook/commands.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export default {
44
CALENDAR_ADD: `${prefix} calendar add`,
55
CALENDAR_GET: `${prefix} calendar get`,
66
CALENDAR_REMOVE: `${prefix} calendar remove`,
7+
CALENDARGROUP_GET: `${prefix} calendargroup get`,
78
CALENDARGROUP_LIST: `${prefix} calendargroup list`,
89
CALENDARGROUP_SET: `${prefix} calendargroup set`,
910
EVENT_CANCEL: `${prefix} event cancel`,

0 commit comments

Comments
 (0)