Skip to content

Commit ab4a22a

Browse files
committed
New command: outlook calendar list. Closes #7075
1 parent 6d1d954 commit ab4a22a

5 files changed

Lines changed: 500 additions & 0 deletions

File tree

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
import Global from '../../_global.mdx';
2+
import Tabs from '@theme/Tabs';
3+
import TabItem from '@theme/TabItem';
4+
5+
# outlook calendar list
6+
7+
Retrieves a list of all calendars of a user or a group.
8+
9+
## Usage
10+
11+
```sh
12+
m365 outlook calendar list [options]
13+
```
14+
15+
## Options
16+
17+
```md definition-list
18+
`--userId [userId]`
19+
: ID of the user. Specify either `userId` or `userName`, but not both.
20+
21+
`--userName [userName]`
22+
: UPN of the user. Specify either `userId` or `userName`, but not both.
23+
24+
`--calendarGroupId [calendarGroupId]`
25+
: ID of the calendar group. Specify either `calendarGroupId` or `calendarGroupName`, but not both.
26+
27+
`--calendarGroupName [calendarGroupName]`
28+
: Name of the calendar group. Specify either `calendarGroupId` or `calendarGroupName`, but not both.
29+
```
30+
31+
<Global />
32+
33+
## Permissions
34+
35+
<Tabs>
36+
<TabItem value="Delegated">
37+
38+
| Resource | Permissions |
39+
|-----------------|-----------------|
40+
| Microsoft Graph | Calendars.Read |
41+
42+
</TabItem>
43+
<TabItem value="Application">
44+
45+
| Resource | Permissions |
46+
|-----------------|-----------------|
47+
| Microsoft Graph | Calendars.Read |
48+
49+
</TabItem>
50+
</Tabs>
51+
52+
## Examples
53+
54+
List all calendars for the current signed-in user.
55+
56+
```sh
57+
m365 outlook calendar list --userId "@meId"
58+
```
59+
60+
List all calendars in a specific calendar group for the current signed-in user.
61+
62+
```sh
63+
m365 outlook calendar list --userId "@meId" --calendarGroupName "Colleague calendars"
64+
```
65+
66+
List all calendars for a specific user.
67+
68+
```sh
69+
m365 outlook calendar list --userName "john.doe@contoso.com"
70+
```
71+
72+
List all calendars from a specific calendar group for a specific user.
73+
74+
```sh
75+
m365 outlook calendar list --userId b743445a-112c-4fda-9afd-05943f9c7b36 --calendarGroupId "AAMkADIxYjJiYmIzLTFmNjYtNGNhMy0YOkcEEh3vhfAAAGgdFjAAA="
76+
```
77+
78+
## Response
79+
80+
<Tabs>
81+
<TabItem value="JSON">
82+
83+
```json
84+
[
85+
{
86+
"id": "AAMkAGI2MDc2YzA0LWQwNTktNGM5Ni05M2VkLWY3NjFkNTUxOTkyZABGAAAAAABeGJMObKvfQbq5qwfGa7kTBwAopDdmUXY8TaLJk5CCLo4zAAAAAAEGAAAopDdmUXY8TaLJk5CCLo4zAAAAAFS0AAA=",
87+
"name": "Calendar",
88+
"color": "auto",
89+
"hexColor": "",
90+
"groupClassId": "0006f0b7-0000-0000-c000-000000000046",
91+
"isDefaultCalendar": true,
92+
"changeKey": "KKQ3ZlF2PE2iyZOQgi6OMwAAAAADcg==",
93+
"canShare": true,
94+
"canViewPrivateItems": true,
95+
"canEdit": true,
96+
"allowedOnlineMeetingProviders": [
97+
"teamsForBusiness"
98+
],
99+
"defaultOnlineMeetingProvider": "teamsForBusiness",
100+
"isTallyingResponses": true,
101+
"isRemovable": false,
102+
"owner": {
103+
"name": "John Doe",
104+
"address": "john.doe@contoso.com"
105+
}
106+
}
107+
]
108+
```
109+
110+
</TabItem>
111+
<TabItem value="Text">
112+
113+
```text
114+
id name
115+
-------------------------------------------------------------------------------------------------------------------------------------------------------- ----------------------
116+
AAMkAGI2MDc2YzA0LWQwNTktNGM5Ni05M2VkLWY3NjFkNTUxOTkyZABGAAAAAABeGJMObKvfQbq5qwfGa7kTBwAopDdmUXY8TaLJk5CCLo4zAAAAAAEGAAAopDdmUXY8TaLJk5CCLo4zAAAAAFS0AAA= Calendar
117+
```
118+
119+
</TabItem>
120+
<TabItem value="CSV">
121+
122+
```csv
123+
id,name,color,hexColor,groupClassId,isDefaultCalendar,changeKey,canShare,canViewPrivateItems,canEdit,defaultOnlineMeetingProvider,isTallyingResponses,isRemovable
124+
AAMkAGI2MDc2YzA0LWQwNTktNGM5Ni05M2VkLWY3NjFkNTUxOTkyZABGAAAAAABeGJMObKvfQbq5qwfGa7kTBwAopDdmUXY8TaLJk5CCLo4zAAAAAAEGAAAopDdmUXY8TaLJk5CCLo4zAAAAAFS0AAA=,Calendar,auto,,0006f0b7-0000-0000-c000-000000000046,1,KKQ3ZlF2PE2iyZOQgi6OMwAAAAADcg==,1,1,1,teamsForBusiness,1,0
125+
```
126+
127+
</TabItem>
128+
<TabItem value="Markdown">
129+
130+
```md
131+
# outlook calendar list --userId "0649d0bd-53dc-4e1d-a357-76f1d92d447b"
132+
133+
Date: 5/11/2026
134+
135+
## Calendar (AAMkAGI2MDc2YzA0LWQwNTktNGM5Ni05M2VkLWY3NjFkNTUxOTkyZABGAAAAAABeGJMObKvfQbq5qwfGa7kTBwAopDdmUXY8TaLJk5CCLo4zAAAAAAEGAAAopDdmUXY8TaLJk5CCLo4zAAAAAFS0AAA=)
136+
137+
Property | Value
138+
---------|-------
139+
id | AAMkAGI2MDc2YzA0LWQwNTktNGM5Ni05M2VkLWY3NjFkNTUxOTkyZABGAAAAAABeGJMObKvfQbq5qwfGa7kTBwAopDdmUXY8TaLJk5CCLo4zAAAAAAEGAAAopDdmUXY8TaLJk5CCLo4zAAAAAFS0AAA=
140+
name | Calendar
141+
color | auto
142+
hexColor |
143+
groupClassId | 0006f0b7-0000-0000-c000-000000000046
144+
isDefaultCalendar | true
145+
changeKey | KKQ3ZlF2PE2iyZOQgi6OMwAAAAADcg==
146+
canShare | true
147+
canViewPrivateItems | true
148+
canEdit | true
149+
defaultOnlineMeetingProvider | teamsForBusiness
150+
isTallyingResponses | true
151+
isRemovable | false
152+
```
153+
154+
</TabItem>
155+
</Tabs>

docs/src/config/sidebars.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,6 +1314,11 @@ const sidebars: SidebarsConfig = {
13141314
label: 'calendar get',
13151315
id: 'cmd/outlook/calendar/calendar-get'
13161316
},
1317+
{
1318+
type: 'doc',
1319+
label: 'calendar list',
1320+
id: 'cmd/outlook/calendar/calendar-list'
1321+
},
13171322
{
13181323
type: 'doc',
13191324
label: 'calendar remove',

src/m365/outlook/commands.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const prefix: string = 'outlook';
33
export default {
44
CALENDAR_ADD: `${prefix} calendar add`,
55
CALENDAR_GET: `${prefix} calendar get`,
6+
CALENDAR_LIST: `${prefix} calendar list`,
67
CALENDAR_REMOVE: `${prefix} calendar remove`,
78
CALENDAR_SET: `${prefix} calendar set`,
89
CALENDARGROUP_GET: `${prefix} calendargroup get`,

0 commit comments

Comments
 (0)