@pnp/cli-microsoft365 11.6.0 → 11.7.0-beta.293104a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/config.js +1 -0
- package/dist/m365/entra/commands/user/user-license-add.js +2 -1
- package/dist/m365/entra/commands/user/user-license-list.js +4 -9
- package/dist/m365/entra/commands/user/user-license-remove.js +2 -1
- package/dist/m365/outlook/commands/calendar/calendar-add.js +85 -0
- package/dist/m365/outlook/commands/calendar/calendar-get.js +71 -0
- package/dist/m365/outlook/commands/calendar/calendar-remove.js +100 -0
- package/dist/m365/outlook/commands/event/event-cancel.js +103 -0
- package/dist/m365/outlook/commands/event/event-list.js +115 -0
- package/dist/m365/outlook/commands/event/event-remove.js +104 -0
- package/dist/m365/outlook/commands.js +6 -0
- package/dist/m365/teams/commands/chat/chat-message-list.js +43 -4
- package/dist/utils/calendar.js +37 -0
- package/dist/utils/calendarGroup.js +22 -0
- package/dist/utils/entraApp.js +9 -2
- package/docs/docs/cmd/entra/license/license-list.mdx +19 -0
- package/docs/docs/cmd/entra/m365group/m365group-conversation-list.mdx +19 -0
- package/docs/docs/cmd/entra/m365group/m365group-conversation-post-list.mdx +19 -0
- package/docs/docs/cmd/entra/user/user-license-add.mdx +19 -0
- package/docs/docs/cmd/entra/user/user-license-list.mdx +18 -1
- package/docs/docs/cmd/entra/user/user-license-remove.mdx +21 -0
- package/docs/docs/cmd/outlook/calendar/calendar-add.mdx +165 -0
- package/docs/docs/cmd/outlook/calendar/calendar-get.mdx +165 -0
- package/docs/docs/cmd/outlook/calendar/calendar-remove.mdx +86 -0
- package/docs/docs/cmd/outlook/event/event-cancel.mdx +85 -0
- package/docs/docs/cmd/outlook/event/event-list.mdx +245 -0
- package/docs/docs/cmd/outlook/event/event-remove.mdx +85 -0
- package/docs/docs/cmd/teams/chat/chat-message-list.mdx +23 -2
- package/npm-shrinkwrap.json +322 -306
- package/package.json +33 -21
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
const prefix = 'outlook';
|
|
2
2
|
export default {
|
|
3
|
+
CALENDAR_ADD: `${prefix} calendar add`,
|
|
4
|
+
CALENDAR_GET: `${prefix} calendar get`,
|
|
5
|
+
CALENDAR_REMOVE: `${prefix} calendar remove`,
|
|
3
6
|
CALENDARGROUP_LIST: `${prefix} calendargroup list`,
|
|
7
|
+
EVENT_CANCEL: `${prefix} event cancel`,
|
|
8
|
+
EVENT_LIST: `${prefix} event list`,
|
|
9
|
+
EVENT_REMOVE: `${prefix} event remove`,
|
|
4
10
|
MAIL_SEARCHFOLDER_ADD: `${prefix} mail searchfolder add`,
|
|
5
11
|
MAIL_SEND: `${prefix} mail send`,
|
|
6
12
|
MAILBOX_SETTINGS_GET: `${prefix} mailbox settings get`,
|
|
@@ -11,9 +11,24 @@ export const options = z.strictObject({
|
|
|
11
11
|
error: e => `'${e.input}' is not a valid value for option chatId.`
|
|
12
12
|
})
|
|
13
13
|
.alias('i'),
|
|
14
|
+
createdEndDateTime: z.string()
|
|
15
|
+
.refine(time => validation.isValidISODateTime(time), {
|
|
16
|
+
error: e => `'${e.input}' is not a valid ISO date-time string for option createdEndDateTime.`
|
|
17
|
+
})
|
|
18
|
+
.optional(),
|
|
14
19
|
endDateTime: z.string()
|
|
15
20
|
.refine(time => validation.isValidISODateTime(time), {
|
|
16
21
|
error: e => `'${e.input}' is not a valid ISO date-time string for option endDateTime.`
|
|
22
|
+
})
|
|
23
|
+
.optional(),
|
|
24
|
+
modifiedStartDateTime: z.string()
|
|
25
|
+
.refine(time => validation.isValidISODateTime(time), {
|
|
26
|
+
error: e => `'${e.input}' is not a valid ISO date-time string for option modifiedStartDateTime.`
|
|
27
|
+
})
|
|
28
|
+
.optional(),
|
|
29
|
+
modifiedEndDateTime: z.string()
|
|
30
|
+
.refine(time => validation.isValidISODateTime(time), {
|
|
31
|
+
error: e => `'${e.input}' is not a valid ISO date-time string for option modifiedEndDateTime.`
|
|
17
32
|
})
|
|
18
33
|
.optional()
|
|
19
34
|
});
|
|
@@ -30,13 +45,37 @@ class TeamsChatMessageListCommand extends GraphCommand {
|
|
|
30
45
|
get schema() {
|
|
31
46
|
return options;
|
|
32
47
|
}
|
|
48
|
+
getRefinedSchema(schema) {
|
|
49
|
+
return schema
|
|
50
|
+
.refine(options => !(options.endDateTime && options.createdEndDateTime), {
|
|
51
|
+
error: 'Specify either endDateTime or createdEndDateTime, but not both.'
|
|
52
|
+
})
|
|
53
|
+
.refine(options => !(options.createdEndDateTime && (options.modifiedStartDateTime || options.modifiedEndDateTime)), {
|
|
54
|
+
error: 'You cannot combine createdEndDateTime with modifiedStartDateTime or modifiedEndDateTime. These filters operate on different properties.'
|
|
55
|
+
})
|
|
56
|
+
.refine(options => !(options.endDateTime && (options.modifiedStartDateTime || options.modifiedEndDateTime)), {
|
|
57
|
+
error: 'You cannot combine endDateTime with modifiedStartDateTime or modifiedEndDateTime. These filters operate on different properties.'
|
|
58
|
+
});
|
|
59
|
+
}
|
|
33
60
|
async commandAction(logger, args) {
|
|
61
|
+
if (args.options.endDateTime) {
|
|
62
|
+
await this.warn(logger, `Option 'endDateTime' is deprecated. Please use 'createdEndDateTime' instead.`);
|
|
63
|
+
args.options.createdEndDateTime = args.options.endDateTime;
|
|
64
|
+
}
|
|
34
65
|
try {
|
|
35
66
|
let apiUrl = `${this.resource}/v1.0/chats/${args.options.chatId}/messages`;
|
|
36
|
-
if (args.options.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
67
|
+
if (args.options.createdEndDateTime) {
|
|
68
|
+
apiUrl += `?$filter=createdDateTime lt ${args.options.createdEndDateTime}&$orderby=createdDateTime desc`;
|
|
69
|
+
}
|
|
70
|
+
else if (args.options.modifiedStartDateTime || args.options.modifiedEndDateTime) {
|
|
71
|
+
const filters = [];
|
|
72
|
+
if (args.options.modifiedStartDateTime) {
|
|
73
|
+
filters.push(`lastModifiedDateTime gt ${args.options.modifiedStartDateTime}`);
|
|
74
|
+
}
|
|
75
|
+
if (args.options.modifiedEndDateTime) {
|
|
76
|
+
filters.push(`lastModifiedDateTime lt ${args.options.modifiedEndDateTime}`);
|
|
77
|
+
}
|
|
78
|
+
apiUrl += `?$filter=${filters.join(' and ')}&$orderby=lastModifiedDateTime desc`;
|
|
40
79
|
}
|
|
41
80
|
const items = await odata.getAllItems(apiUrl);
|
|
42
81
|
if (args.options.output && args.options.output !== 'json') {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { odata } from './odata.js';
|
|
2
|
+
import { formatting } from './formatting.js';
|
|
3
|
+
import { cli } from '../cli/cli.js';
|
|
4
|
+
import request from '../request.js';
|
|
5
|
+
export const calendar = {
|
|
6
|
+
async getUserCalendarById(userId, calendarId, calendarGroupId, properties) {
|
|
7
|
+
let url = `https://graph.microsoft.com/v1.0/users('${userId}')/${calendarGroupId ? `calendarGroups/${calendarGroupId}/` : ''}calendars/${calendarId}`;
|
|
8
|
+
if (properties) {
|
|
9
|
+
url += `?$select=${properties}`;
|
|
10
|
+
}
|
|
11
|
+
const requestOptions = {
|
|
12
|
+
url: url,
|
|
13
|
+
headers: {
|
|
14
|
+
accept: 'application/json;odata.metadata=none'
|
|
15
|
+
},
|
|
16
|
+
responseType: 'json'
|
|
17
|
+
};
|
|
18
|
+
return await request.get(requestOptions);
|
|
19
|
+
},
|
|
20
|
+
async getUserCalendarByName(userId, name, calendarGroupId, properties) {
|
|
21
|
+
let url = `https://graph.microsoft.com/v1.0/users('${userId}')/${calendarGroupId ? `calendarGroups/${calendarGroupId}/` : ''}calendars?$filter=name eq '${formatting.encodeQueryParameter(name)}'`;
|
|
22
|
+
if (properties) {
|
|
23
|
+
url += `&$select=${properties}`;
|
|
24
|
+
}
|
|
25
|
+
const calendars = await odata.getAllItems(url);
|
|
26
|
+
if (calendars.length === 0) {
|
|
27
|
+
throw new Error(`The specified calendar '${name}' does not exist.`);
|
|
28
|
+
}
|
|
29
|
+
if (calendars.length > 1) {
|
|
30
|
+
const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', calendars);
|
|
31
|
+
const selectedCalendar = await cli.handleMultipleResultsFound(`Multiple calendars with name '${name}' found.`, resultAsKeyValuePair);
|
|
32
|
+
return selectedCalendar;
|
|
33
|
+
}
|
|
34
|
+
return calendars[0];
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=calendar.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { odata } from './odata.js';
|
|
2
|
+
import { formatting } from './formatting.js';
|
|
3
|
+
import { cli } from '../cli/cli.js';
|
|
4
|
+
export const calendarGroup = {
|
|
5
|
+
async getUserCalendarGroupByName(userId, displayName, properties) {
|
|
6
|
+
let url = `https://graph.microsoft.com/v1.0/users('${userId}')/calendarGroups?$filter=name eq '${formatting.encodeQueryParameter(displayName)}'`;
|
|
7
|
+
if (properties) {
|
|
8
|
+
url += `&$select=${properties}`;
|
|
9
|
+
}
|
|
10
|
+
const calendarGroups = await odata.getAllItems(url);
|
|
11
|
+
if (calendarGroups.length === 0) {
|
|
12
|
+
throw new Error(`The specified calendar group '${displayName}' does not exist.`);
|
|
13
|
+
}
|
|
14
|
+
if (calendarGroups.length > 1) {
|
|
15
|
+
const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', calendarGroups);
|
|
16
|
+
const selectedCalendarGroup = await cli.handleMultipleResultsFound(`Multiple calendar groups with name '${displayName}' found.`, resultAsKeyValuePair);
|
|
17
|
+
return selectedCalendarGroup;
|
|
18
|
+
}
|
|
19
|
+
return calendarGroups[0];
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=calendarGroup.js.map
|
package/dist/utils/entraApp.js
CHANGED
|
@@ -336,8 +336,15 @@ export const entraApp = {
|
|
|
336
336
|
},
|
|
337
337
|
responseType: 'json'
|
|
338
338
|
};
|
|
339
|
-
|
|
340
|
-
|
|
339
|
+
try {
|
|
340
|
+
return await request.get(requestOptions);
|
|
341
|
+
}
|
|
342
|
+
catch (error) {
|
|
343
|
+
if (error?.response?.status === 404) {
|
|
344
|
+
throw Error(`App with objectId '${objectId}' not found in Microsoft Entra ID.`);
|
|
345
|
+
}
|
|
346
|
+
throw error;
|
|
347
|
+
}
|
|
341
348
|
}
|
|
342
349
|
};
|
|
343
350
|
//# sourceMappingURL=entraApp.js.map
|
|
@@ -16,6 +16,25 @@ m365 entra license list [options]
|
|
|
16
16
|
|
|
17
17
|
<Global />
|
|
18
18
|
|
|
19
|
+
## Permissions
|
|
20
|
+
|
|
21
|
+
<Tabs>
|
|
22
|
+
<TabItem value="Delegated">
|
|
23
|
+
|
|
24
|
+
| Resource | Permissions |
|
|
25
|
+
|-----------------|----------------------------|
|
|
26
|
+
| Microsoft Graph | LicenseAssignment.Read.All |
|
|
27
|
+
|
|
28
|
+
</TabItem>
|
|
29
|
+
<TabItem value="Application">
|
|
30
|
+
|
|
31
|
+
| Resource | Permissions |
|
|
32
|
+
|-----------------|----------------------------|
|
|
33
|
+
| Microsoft Graph | LicenseAssignment.Read.All |
|
|
34
|
+
|
|
35
|
+
</TabItem>
|
|
36
|
+
</Tabs>
|
|
37
|
+
|
|
19
38
|
## Examples
|
|
20
39
|
|
|
21
40
|
List all licenses within the tenant.
|
|
@@ -24,6 +24,25 @@ m365 entra m365group conversation list [options]
|
|
|
24
24
|
|
|
25
25
|
<Global />
|
|
26
26
|
|
|
27
|
+
## Permissions
|
|
28
|
+
|
|
29
|
+
<Tabs>
|
|
30
|
+
<TabItem value="Delegated">
|
|
31
|
+
|
|
32
|
+
| Resource | Permissions |
|
|
33
|
+
|-----------------|-----------------------------|
|
|
34
|
+
| Microsoft Graph | Group-Conversation.Read.All |
|
|
35
|
+
|
|
36
|
+
</TabItem>
|
|
37
|
+
<TabItem value="Application">
|
|
38
|
+
|
|
39
|
+
| Resource | Permissions |
|
|
40
|
+
|-----------------|-----------------------------|
|
|
41
|
+
| Microsoft Graph | Group-Conversation.Read.All |
|
|
42
|
+
|
|
43
|
+
</TabItem>
|
|
44
|
+
</Tabs>
|
|
45
|
+
|
|
27
46
|
## Examples
|
|
28
47
|
|
|
29
48
|
Lists conversations for the Microsoft 365 group specified by id.
|
|
@@ -27,6 +27,25 @@ m365 entra m365group conversation post list [options]
|
|
|
27
27
|
|
|
28
28
|
<Global />
|
|
29
29
|
|
|
30
|
+
## Permissions
|
|
31
|
+
|
|
32
|
+
<Tabs>
|
|
33
|
+
<TabItem value="Delegated">
|
|
34
|
+
|
|
35
|
+
| Resource | Permissions |
|
|
36
|
+
|-----------------|-----------------------------|
|
|
37
|
+
| Microsoft Graph | Group-Conversation.Read.All |
|
|
38
|
+
|
|
39
|
+
</TabItem>
|
|
40
|
+
<TabItem value="Application">
|
|
41
|
+
|
|
42
|
+
| Resource | Permissions |
|
|
43
|
+
|-----------------|-----------------------------|
|
|
44
|
+
| Microsoft Graph | Group-Conversation.Read.All |
|
|
45
|
+
|
|
46
|
+
</TabItem>
|
|
47
|
+
</Tabs>
|
|
48
|
+
|
|
30
49
|
## Examples
|
|
31
50
|
|
|
32
51
|
Lists the posts of the specific conversation of Microsoft 365 group by groupId
|
|
@@ -35,6 +35,25 @@ The user must have a `usageLocation` value in order to assign a license to it.
|
|
|
35
35
|
|
|
36
36
|
:::
|
|
37
37
|
|
|
38
|
+
## Permissions
|
|
39
|
+
|
|
40
|
+
<Tabs>
|
|
41
|
+
<TabItem value="Delegated">
|
|
42
|
+
|
|
43
|
+
| Resource | Permissions |
|
|
44
|
+
|-----------------|---------------------------------|
|
|
45
|
+
| Microsoft Graph | LicenseAssignment.ReadWrite.All |
|
|
46
|
+
|
|
47
|
+
</TabItem>
|
|
48
|
+
<TabItem value="Application">
|
|
49
|
+
|
|
50
|
+
| Resource | Permissions |
|
|
51
|
+
|-----------------|---------------------------------|
|
|
52
|
+
| Microsoft Graph | LicenseAssignment.ReadWrite.All |
|
|
53
|
+
|
|
54
|
+
</TabItem>
|
|
55
|
+
</Tabs>
|
|
56
|
+
|
|
38
57
|
## Examples
|
|
39
58
|
|
|
40
59
|
Assign specific licenses to a specific user by UPN.
|
|
@@ -28,10 +28,27 @@ m365 entra user license list [options]
|
|
|
28
28
|
|
|
29
29
|
:::tip
|
|
30
30
|
|
|
31
|
-
If you don't specify any option, the command will list the license details of the current logged in user.
|
|
31
|
+
If you don't specify any option, the command will list the license details of the current logged in user.
|
|
32
32
|
|
|
33
33
|
:::
|
|
34
34
|
|
|
35
|
+
## Permissions
|
|
36
|
+
|
|
37
|
+
<Tabs>
|
|
38
|
+
<TabItem value="Delegated">
|
|
39
|
+
|
|
40
|
+
| Resource | Permissions |
|
|
41
|
+
|-----------------|----------------------------|
|
|
42
|
+
| Microsoft Graph | LicenseAssignment.Read.All |
|
|
43
|
+
|
|
44
|
+
</TabItem>
|
|
45
|
+
<TabItem value="Application">
|
|
46
|
+
|
|
47
|
+
This command does not support application permissions.
|
|
48
|
+
|
|
49
|
+
</TabItem>
|
|
50
|
+
</Tabs>
|
|
51
|
+
|
|
35
52
|
## Examples
|
|
36
53
|
|
|
37
54
|
List license details of the current logged in user.
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import Global from '../../_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
2
4
|
|
|
3
5
|
# entra user license remove
|
|
4
6
|
|
|
@@ -28,6 +30,25 @@ m365 entra user license remove [options]
|
|
|
28
30
|
|
|
29
31
|
<Global />
|
|
30
32
|
|
|
33
|
+
## Permissions
|
|
34
|
+
|
|
35
|
+
<Tabs>
|
|
36
|
+
<TabItem value="Delegated">
|
|
37
|
+
|
|
38
|
+
| Resource | Permissions |
|
|
39
|
+
|-----------------|---------------------------------|
|
|
40
|
+
| Microsoft Graph | LicenseAssignment.ReadWrite.All |
|
|
41
|
+
|
|
42
|
+
</TabItem>
|
|
43
|
+
<TabItem value="Application">
|
|
44
|
+
|
|
45
|
+
| Resource | Permissions |
|
|
46
|
+
|-----------------|---------------------------------|
|
|
47
|
+
| Microsoft Graph | LicenseAssignment.ReadWrite.All |
|
|
48
|
+
|
|
49
|
+
</TabItem>
|
|
50
|
+
</Tabs>
|
|
51
|
+
|
|
31
52
|
## Examples
|
|
32
53
|
|
|
33
54
|
Remove specific licenses from a specific user by UPN.
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import Global from '../../_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# outlook calendar add
|
|
6
|
+
|
|
7
|
+
Creates a new calendar for a user
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 outlook calendar add [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
|
+
`--name <name>`
|
|
25
|
+
: Name of the calendar.
|
|
26
|
+
|
|
27
|
+
`--calendarGroupId [calendarGroupId]`
|
|
28
|
+
: Id of the group where the calendar will belong. Specify either `calendarGroupId` or `calendarGroupName`, but not both.
|
|
29
|
+
|
|
30
|
+
`--calendarGroupName [calendarGroupName]`
|
|
31
|
+
: Name of the group where the calendar will belong. Specify either `calendarGroupId` or `calendarGroupName`, but not both.
|
|
32
|
+
|
|
33
|
+
`--color [color]`
|
|
34
|
+
: The color of the calendar in UI. Allowed values are `auto`, `lightBlue`, `lightGreen`, `lightOrange`, `lightGray`, `lightYellow`, `lightTeal`, `lightPink`, `lightBrown`, `lightRed`, `maxColor`. Defaults to `auto`.
|
|
35
|
+
|
|
36
|
+
`--defaultOnlineMeetingProvider [defaultOnlineMeetingProvider]`
|
|
37
|
+
: The default online meeting provider for meetings sent from the calendar. Allowed values are `none`, `teamsForBusiness`. Defaults to `teamsForBusiness`.
|
|
38
|
+
|
|
39
|
+
`--default`
|
|
40
|
+
: Specify whether the calendar will be the default calendar for new events.
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
<Global />
|
|
44
|
+
|
|
45
|
+
## Permissions
|
|
46
|
+
|
|
47
|
+
<Tabs>
|
|
48
|
+
<TabItem value="Delegated">
|
|
49
|
+
|
|
50
|
+
| Resource | Permissions |
|
|
51
|
+
|-----------------|---------------------|
|
|
52
|
+
| Microsoft Graph | Calendars.ReadWrite |
|
|
53
|
+
|
|
54
|
+
</TabItem>
|
|
55
|
+
<TabItem value="Application">
|
|
56
|
+
|
|
57
|
+
| Resource | Permissions |
|
|
58
|
+
|-----------------|---------------------|
|
|
59
|
+
| Microsoft Graph | Calendars.ReadWrite |
|
|
60
|
+
|
|
61
|
+
</TabItem>
|
|
62
|
+
</Tabs>
|
|
63
|
+
|
|
64
|
+
## Examples
|
|
65
|
+
|
|
66
|
+
Create a new calendar for a user in a default calendar's group
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
m365 outlook calendar add --userId '@meId' --name 'Holidays'
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Create a new calendar for a user specified by email in a specific calendar group and defined color
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
m365 outlook calendar add --userName 'john.doe@contoso.com' --name 'Interviews' --calendarGroupId 'AAMkADY1YmE3N2FhLWEwMz' --color 'lightBlue'
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Response
|
|
79
|
+
|
|
80
|
+
<Tabs>
|
|
81
|
+
<TabItem value="JSON">
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"id": "AQMkAGRlMCQAAAA==",
|
|
86
|
+
"name": "My Calendars",
|
|
87
|
+
"color": "auto",
|
|
88
|
+
"hexColor": "",
|
|
89
|
+
"groupClassId": "0006f0b7-0000-0000-c000-000000000046",
|
|
90
|
+
"isDefaultCalendar": false,
|
|
91
|
+
"changeKey": "fJKVL07sbkmIfHqjbDnRgQACxSYYpw==",
|
|
92
|
+
"canShare": true,
|
|
93
|
+
"canViewPrivateItems": true,
|
|
94
|
+
"canEdit": true,
|
|
95
|
+
"allowedOnlineMeetingProviders": [
|
|
96
|
+
"teamsForBusiness"
|
|
97
|
+
],
|
|
98
|
+
"defaultOnlineMeetingProvider": "teamsForBusiness",
|
|
99
|
+
"isTallyingResponses": false,
|
|
100
|
+
"isRemovable": true,
|
|
101
|
+
"owner": {
|
|
102
|
+
"name": "John Doe",
|
|
103
|
+
"address": "john.doe@contoso.com"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
</TabItem>
|
|
109
|
+
<TabItem value="Text">
|
|
110
|
+
|
|
111
|
+
```text
|
|
112
|
+
allowedOnlineMeetingProviders: ["teamsForBusiness"]
|
|
113
|
+
canEdit : true
|
|
114
|
+
canShare : true
|
|
115
|
+
canViewPrivateItems : true
|
|
116
|
+
changeKey : fJKVL07sbkmIfHqjbDnRgQACxSYYug==
|
|
117
|
+
color : auto
|
|
118
|
+
defaultOnlineMeetingProvider : teamsForBusiness
|
|
119
|
+
groupClassId : 0006f0b7-0000-0000-c000-000000000046
|
|
120
|
+
hexColor :
|
|
121
|
+
id : AQMkAGRlMCQAAAA==
|
|
122
|
+
isDefaultCalendar : false
|
|
123
|
+
isRemovable : true
|
|
124
|
+
isTallyingResponses : false
|
|
125
|
+
name : My Calendars
|
|
126
|
+
owner : {"name":"John Doe","address":"john.doe@contoso.com"}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
</TabItem>
|
|
130
|
+
<TabItem value="CSV">
|
|
131
|
+
|
|
132
|
+
```csv
|
|
133
|
+
id,name,color,hexColor,groupClassId,isDefaultCalendar,changeKey,canShare,canViewPrivateItems,canEdit,defaultOnlineMeetingProvider,isTallyingResponses,isRemovable
|
|
134
|
+
AQMkAGRlMCQAAAA==,My Calendars,auto,,0006f0b7-0000-0000-c000-000000000046,0,fJKVL07sbkmIfHqjbDnRgQACxSYYzQ==,1,1,1,teamsForBusiness,0,1
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
</TabItem>
|
|
138
|
+
<TabItem value="Markdown">
|
|
139
|
+
|
|
140
|
+
```md
|
|
141
|
+
# outlook calendar add --userId "893f9116-e024-4bc6-8e98-54c245129485" --name "My Calendars"
|
|
142
|
+
|
|
143
|
+
Date: 2/5/2026
|
|
144
|
+
|
|
145
|
+
## My Calendars (AQMkAGRlMCQAAAA==)
|
|
146
|
+
|
|
147
|
+
Property | Value
|
|
148
|
+
---------|-------
|
|
149
|
+
id | AQMkAGRlMCQAAAA==
|
|
150
|
+
name | My Calendars
|
|
151
|
+
color | auto
|
|
152
|
+
hexColor |
|
|
153
|
+
groupClassId | 0006f0b7-0000-0000-c000-000000000046
|
|
154
|
+
isDefaultCalendar | false
|
|
155
|
+
changeKey | fJKVL07sbkmIfHqjbDnRgQACxSYY4A==
|
|
156
|
+
canShare | true
|
|
157
|
+
canViewPrivateItems | true
|
|
158
|
+
canEdit | true
|
|
159
|
+
defaultOnlineMeetingProvider | teamsForBusiness
|
|
160
|
+
isTallyingResponses | false
|
|
161
|
+
isRemovable | true
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
</TabItem>
|
|
165
|
+
</Tabs>
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import Global from '../../_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# outlook calendar get
|
|
6
|
+
|
|
7
|
+
Retrieves the calendar of a user or a group.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 outlook calendar get [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-i, --id [id]`
|
|
19
|
+
: ID of the calendar. Specify either `id` or `name`, but not both.
|
|
20
|
+
|
|
21
|
+
`-n, --name [name]`
|
|
22
|
+
: Name of the calendar. 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
|
+
`--calendarGroupId [calendarGroupId]`
|
|
31
|
+
: ID of the calendar group. Specify either `calendarGroupId` or `calendarGroupName`, but not both.
|
|
32
|
+
|
|
33
|
+
`--calendarGroupName [calendarGroupName]`
|
|
34
|
+
: Name of the calendar group. Specify either `calendarGroupId` or `calendarGroupName`, but not both.
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
<Global />
|
|
38
|
+
|
|
39
|
+
## Permissions
|
|
40
|
+
|
|
41
|
+
<Tabs>
|
|
42
|
+
<TabItem value="Delegated">
|
|
43
|
+
|
|
44
|
+
| Resource | Permissions |
|
|
45
|
+
|-----------------|--------------------|
|
|
46
|
+
| Microsoft Graph | Calendar.ReadBasic |
|
|
47
|
+
|
|
48
|
+
</TabItem>
|
|
49
|
+
<TabItem value="Application">
|
|
50
|
+
|
|
51
|
+
| Resource | Permissions |
|
|
52
|
+
|-----------------|--------------------|
|
|
53
|
+
| Microsoft Graph | Calendar.ReadBasic |
|
|
54
|
+
|
|
55
|
+
</TabItem>
|
|
56
|
+
</Tabs>
|
|
57
|
+
|
|
58
|
+
## Examples
|
|
59
|
+
|
|
60
|
+
Get the calendar for the current signed-in user by id.
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
m365 outlook calendar get --userId "@meId" --id "AAMkAGI2TGuLAAA="
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Get the calendar from a specific calendar group for the current signed-in user by name.
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
m365 outlook calendar get --userId "@meId" --calendarGroupName "Colleague calendars" --name "Calendar"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Get the calendar from a specific calendar group for a specific user by name.
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
m365 outlook calendar get --userId b743445a-112c-4fda-9afd-05943f9c7b36 --calendarGroupId "AAMkADIxYjJiYmIzLTFmNjYtNGNhMy0YOkcEEh3vhfAAAGgdFjAAA=" --name "Calendar"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Response
|
|
79
|
+
|
|
80
|
+
<Tabs>
|
|
81
|
+
<TabItem value="JSON">
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"id": "AQMkAGRAAAA==",
|
|
86
|
+
"name": "Calendar",
|
|
87
|
+
"color": "lightOrange",
|
|
88
|
+
"hexColor": "#f7630c",
|
|
89
|
+
"groupClassId": "0006f0b7-0000-0000-c000-000000000046",
|
|
90
|
+
"isDefaultCalendar": true,
|
|
91
|
+
"changeKey": "fJKVL07sbkmIfHqjbDnRgQAACWzbtQ==",
|
|
92
|
+
"canShare": true,
|
|
93
|
+
"canViewPrivateItems": true,
|
|
94
|
+
"canEdit": true,
|
|
95
|
+
"allowedOnlineMeetingProviders": [
|
|
96
|
+
"teamsForBusiness"
|
|
97
|
+
],
|
|
98
|
+
"defaultOnlineMeetingProvider": "teamsForBusiness",
|
|
99
|
+
"isTallyingResponses": true,
|
|
100
|
+
"isRemovable": false,
|
|
101
|
+
"owner": {
|
|
102
|
+
"name": "John Doe",
|
|
103
|
+
"address": "john.doe@contoso.com"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
</TabItem>
|
|
109
|
+
<TabItem value="Text">
|
|
110
|
+
|
|
111
|
+
```text
|
|
112
|
+
allowedOnlineMeetingProviders: ["teamsForBusiness"]
|
|
113
|
+
canEdit : true
|
|
114
|
+
canShare : true
|
|
115
|
+
canViewPrivateItems : true
|
|
116
|
+
changeKey : fJKVL07sbkmIfHqjbDnRgQAACWzbtQ==
|
|
117
|
+
color : lightOrange
|
|
118
|
+
defaultOnlineMeetingProvider : teamsForBusiness
|
|
119
|
+
groupClassId : 0006f0b7-0000-0000-c000-000000000046
|
|
120
|
+
hexColor : #f7630c
|
|
121
|
+
id : AQMkAGRAAAA==
|
|
122
|
+
isDefaultCalendar : true
|
|
123
|
+
isRemovable : false
|
|
124
|
+
isTallyingResponses : true
|
|
125
|
+
name : Calendar
|
|
126
|
+
owner : {"name":"John Doe","address":"john.doe@contoso.com"}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
</TabItem>
|
|
130
|
+
<TabItem value="CSV">
|
|
131
|
+
|
|
132
|
+
```csv
|
|
133
|
+
id,name,color,hexColor,groupClassId,isDefaultCalendar,changeKey,canShare,canViewPrivateItems,canEdit,defaultOnlineMeetingProvider,isTallyingResponses,isRemovable
|
|
134
|
+
AQMkAGRAAAA==,Calendar,lightOrange,#f7630c,0006f0b7-0000-0000-c000-000000000046,1,fJKVL07sbkmIfHqjbDnRgQAACWzbtQ==,1,1,1,teamsForBusiness,1,0
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
</TabItem>
|
|
138
|
+
<TabItem value="Markdown">
|
|
139
|
+
|
|
140
|
+
```md
|
|
141
|
+
# outlook calendar get --name "Calendar" --userName "john.doe@contoso.com"
|
|
142
|
+
|
|
143
|
+
Date: 2/9/2026
|
|
144
|
+
|
|
145
|
+
## Calendar (AQMkAGRAAAA==)
|
|
146
|
+
|
|
147
|
+
Property | Value
|
|
148
|
+
---------|-------
|
|
149
|
+
id | AQMkAGRAAAA==
|
|
150
|
+
name | Calendar
|
|
151
|
+
color | lightOrange
|
|
152
|
+
hexColor | #f7630c
|
|
153
|
+
groupClassId | 0006f0b7-0000-0000-c000-000000000046
|
|
154
|
+
isDefaultCalendar | true
|
|
155
|
+
changeKey | fJKVL07sbkmIfHqjbDnRgQAACWzbtQ==
|
|
156
|
+
canShare | true
|
|
157
|
+
canViewPrivateItems | true
|
|
158
|
+
canEdit | true
|
|
159
|
+
defaultOnlineMeetingProvider | teamsForBusiness
|
|
160
|
+
isTallyingResponses | true
|
|
161
|
+
isRemovable | false
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
</TabItem>
|
|
165
|
+
</Tabs>
|