Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 126 additions & 0 deletions docs/docs/cmd/outlook/calendargroup/calendargroup-add.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
import Global from '../../_global.mdx';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# outlook calendargroup add

Creates a new calendar group for a user.

## Usage

```sh
m365 outlook calendargroup add [options]
```

## Options

```md definition-list
`--userId [userId]`
: ID of the user. Specify either `userId` or `userName`, but not both.

`--userName [userName]`
: UPN of the user. Specify either `userId` or `userName`, but not both.

`--name <name>`
: Name of the calendar group.
```

<Global />

## Permissions

<Tabs>
<TabItem value="Delegated">

| Resource | Permissions |
|-----------------|----------------------------------------|
| Microsoft Graph | Calendars.ReadWrite, Calendars.ReadWrite.Shared |

</TabItem>
<TabItem value="Application">

| Resource | Permissions |
|-----------------|----------------------|
| Microsoft Graph | Calendars.ReadWrite |

</TabItem>
</Tabs>

:::note

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.

:::

## Examples

Create a new calendar group for the current user

```sh
m365 outlook calendargroup add --name "Personal Events" --userId "@meId"
```

Create a new calendar group for a user

```sh
m365 outlook calendargroup add --name "Personal Events" --userId "44288f7d-7710-4293-8c8e-36f310ed2e6a"
```

Create a new calendar group for a user specified by email

```sh
m365 outlook calendargroup add --name "Personal Events" --userName "john.doe@contoso.com"
```

## Response

<Tabs>
<TabItem value="JSON">

```json
{
"id": "AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YWMyLTJhZGY2MGExMGU0MgBGAAADSG3wPE27kUeySjmT5eRT8QcAfJKVL07sbkmIfHqjbDnRgQAAAgEGAAAAfJKVL07sbkmIfHqjbDnRgQADK5c4ngAAAA==",
"name": "My Work Calendars",
"classId": "c02d4ddf-4809-485f-9cd4-1ef0937e03be",
"changeKey": "fJKVL07sbkmIfHqjbDnRgQADKqwfAA=="
}
```

</TabItem>
<TabItem value="Text">

```text
changeKey: fJKVL07sbkmIfHqjbDnRgQADKqwfAA==
classId : c02d4ddf-4809-485f-9cd4-1ef0937e03be
id : AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YWMyLTJhZGY2MGExMGU0MgBGAAADSG3wPE27kUeySjmT5eRT8QcAfJKVL07sbkmIfHqjbDnRgQAAAgEGAAAAfJKVL07sbkmIfHqjbDnRgQADK5c4ngAAAA==
name : My Work Calendars
```

</TabItem>
<TabItem value="CSV">

```csv
id,name,classId,changeKey
AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YWMyLTJhZGY2MGExMGU0MgBGAAADSG3wPE27kUeySjmT5eRT8QcAfJKVL07sbkmIfHqjbDnRgQAAAgEGAAAAfJKVL07sbkmIfHqjbDnRgQADK5c4ngAAAA==,My Work Calendars,c02d4ddf-4809-485f-9cd4-1ef0937e03be,fJKVL07sbkmIfHqjbDnRgQADKqwfAA==
```

</TabItem>
<TabItem value="Markdown">

```md
# outlook calendargroup add --debug "false" --verbose "false" --name "My Work Calendars"

Date: 7/9/2026

## My Work Calendars (AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YWMyLTJhZGY2MGExMGU0MgBGAAADSG3wPE27kUeySjmT5eRT8QcAfJKVL07sbkmIfHqjbDnRgQAAAgEGAAAAfJKVL07sbkmIfHqjbDnRgQADK5c4ngAAAA==)

Property | Value
---------|-------
id | AQMkAGRlM2Y5YTkzLWI2NzAtNDczOS05YWMyLTJhZGY2MGExMGU0MgBGAAADSG3wPE27kUeySjmT5eRT8QcAfJKVL07sbkmIfHqjbDnRgQAAAgEGAAAAfJKVL07sbkmIfHqjbDnRgQADK5c4ngAAAA==
name | My Work Calendars
classId | c02d4ddf-4809-485f-9cd4-1ef0937e03be
changeKey | fJKVL07sbkmIfHqjbDnRgQADKqwfAA==
```

</TabItem>
</Tabs>
5 changes: 5 additions & 0 deletions docs/src/config/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1333,6 +1333,11 @@ const sidebars: SidebarsConfig = {
},
{
calendargroup: [
{
type: 'doc',
label: 'calendargroup add',
id: 'cmd/outlook/calendargroup/calendargroup-add'
},
{
type: 'doc',
label: 'calendargroup list',
Expand Down
1 change: 1 addition & 0 deletions src/m365/outlook/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default {
CALENDAR_LIST: `${prefix} calendar list`,
CALENDAR_REMOVE: `${prefix} calendar remove`,
CALENDAR_SET: `${prefix} calendar set`,
CALENDARGROUP_ADD: `${prefix} calendargroup add`,
CALENDARGROUP_GET: `${prefix} calendargroup get`,
CALENDARGROUP_LIST: `${prefix} calendargroup list`,
CALENDARGROUP_REMOVE: `${prefix} calendargroup remove`,
Expand Down
Loading
Loading