|
| 1 | +import Global from '../../_global.mdx'; |
| 2 | +import Tabs from '@theme/Tabs'; |
| 3 | +import TabItem from '@theme/TabItem'; |
| 4 | + |
| 5 | +# outlook calendargroup set |
| 6 | + |
| 7 | +Updates a calendar group for a user. |
| 8 | + |
| 9 | +## Usage |
| 10 | + |
| 11 | +```sh |
| 12 | +m365 outlook calendargroup set [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. |
| 26 | + |
| 27 | +`--userName [userName]` |
| 28 | +: UPN of the user. Specify either `userId` or `userName`, but not both. |
| 29 | + |
| 30 | +`--newName <newName>` |
| 31 | +: New name of the calendar group. |
| 32 | +``` |
| 33 | + |
| 34 | +<Global /> |
| 35 | + |
| 36 | +## Permissions |
| 37 | + |
| 38 | +<Tabs> |
| 39 | + <TabItem value="Delegated"> |
| 40 | + |
| 41 | + | Resource | Permissions | |
| 42 | + |-----------------|----------------------------------------| |
| 43 | + | Microsoft Graph | Calendars.ReadWrite, Calendars.ReadWrite.Shared | |
| 44 | + |
| 45 | + </TabItem> |
| 46 | + <TabItem value="Application"> |
| 47 | + |
| 48 | + | Resource | Permissions | |
| 49 | + |-----------------|----------------------| |
| 50 | + | Microsoft Graph | Calendars.ReadWrite | |
| 51 | + |
| 52 | + </TabItem> |
| 53 | +</Tabs> |
| 54 | + |
| 55 | +:::note |
| 56 | + |
| 57 | +When using delegated permissions, specifying `userId` or `userName` for a different user requires the `Calendars.ReadWrite.Shared` scope. When the specified user matches the signed-in user, no shared scope is needed. |
| 58 | + |
| 59 | +::: |
| 60 | + |
| 61 | +## Examples |
| 62 | + |
| 63 | +Update the calendar group specified by name for the current user. |
| 64 | + |
| 65 | +```sh |
| 66 | +m365 outlook calendargroup set --name "Personal Evts" --newName "Personal Events" |
| 67 | +``` |
| 68 | + |
| 69 | +Update the calendar group specified by id for a user. |
| 70 | + |
| 71 | +```sh |
| 72 | +m365 outlook calendargroup set --id "AAMkADIxYjJiYm" --newName "Personal Events" --userId "44288f7d-7710-4293-8c8e-36f310ed2e6a" |
| 73 | +``` |
| 74 | + |
| 75 | +Update the calendar group specified by name for a user specified by email. |
| 76 | + |
| 77 | +```sh |
| 78 | +m365 outlook calendargroup set --name "Personal Evts" --newName "Personal Events" --userName "john.doe@contoso.com" |
| 79 | +``` |
| 80 | + |
| 81 | +## Response |
| 82 | + |
| 83 | +The command won't return a response on success. |
0 commit comments