|
| 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 | + |
0 commit comments