Skip to content
Closed
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
165 changes: 165 additions & 0 deletions docs/docs/cmd/outlook/calendar/calendar-add.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
import Global from '../../_global.mdx';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# outlook calendar add

Creates a new calendar for a user

## Usage

```sh
m365 outlook calendar 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.

`--calendarGroupId [calendarGroupId]`
: Id of the group where the calendar will belong. Specify either `calendarGroupId` or `calendarGroupName`, but not both.

`--calendarGroupName [calendarGroupName]`
: Name of the group where the calendar will belong. Specify either `calendarGroupId` or `calendarGroupName`, but not both.

`--color [color]`
: The color of the calendar in UI. Allowed values are `auto`, `lightBlue`, `lightGreen`, `lightOrange`, `lightGray`, `lightYellow`, `lightTeal`, `lightPink`, `lightBrown`, `lightRed`, `maxColor`. Defaults to `auto`.

`--defaultOnlineMeetingProvider [defaultOnlineMeetingProvider]`
: The default online meeting provider for meetings sent from the calendar. Allowed values are `none`, `teamsForBusiness`. Defaults to `teamsForBusiness`.

`--default`
: Specify whether the calendar will be the default calendar for new events.
```

<Global />

## Permissions

<Tabs>
<TabItem value="Delegated">

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

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

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

</TabItem>
</Tabs>

## Examples

Create a new calendar for a user in a default calendar's group

```sh
m365 outlook calendar add --userId '@meId' --name 'Holidays'
```

Create a new calendar for a user specified by email in a specific calendar group and defined color

```sh
m365 outlook calendar add --userName 'john.doe@contoso.com' --name 'Interviews' --calendarGroupId 'AAMkADY1YmE3N2FhLWEwMz' --color 'lightBlue'
```

## Response

<Tabs>
<TabItem value="JSON">

```json
{
"id": "AQMkAGRlMCQAAAA==",
"name": "My Calendars",
"color": "auto",
"hexColor": "",
"groupClassId": "0006f0b7-0000-0000-c000-000000000046",
"isDefaultCalendar": false,
"changeKey": "fJKVL07sbkmIfHqjbDnRgQACxSYYpw==",
"canShare": true,
"canViewPrivateItems": true,
"canEdit": true,
"allowedOnlineMeetingProviders": [
"teamsForBusiness"
],
"defaultOnlineMeetingProvider": "teamsForBusiness",
"isTallyingResponses": false,
"isRemovable": true,
"owner": {
"name": "John Doe",
"address": "john.doe@contoso.com"
}
}
```

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

```text
allowedOnlineMeetingProviders: ["teamsForBusiness"]
canEdit : true
canShare : true
canViewPrivateItems : true
changeKey : fJKVL07sbkmIfHqjbDnRgQACxSYYug==
color : auto
defaultOnlineMeetingProvider : teamsForBusiness
groupClassId : 0006f0b7-0000-0000-c000-000000000046
hexColor :
id : AQMkAGRlMCQAAAA==
isDefaultCalendar : false
isRemovable : true
isTallyingResponses : false
name : My Calendars
owner : {"name":"John Doe","address":"john.doe@contoso.com"}
```

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

```csv
id,name,color,hexColor,groupClassId,isDefaultCalendar,changeKey,canShare,canViewPrivateItems,canEdit,defaultOnlineMeetingProvider,isTallyingResponses,isRemovable
AQMkAGRlMCQAAAA==,My Calendars,auto,,0006f0b7-0000-0000-c000-000000000046,0,fJKVL07sbkmIfHqjbDnRgQACxSYYzQ==,1,1,1,teamsForBusiness,0,1
```

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

```md
# outlook calendar add --userId "893f9116-e024-4bc6-8e98-54c245129485" --name "My Calendars"

Date: 2/5/2026

## My Calendars (AQMkAGRlMCQAAAA==)

Property | Value
---------|-------
id | AQMkAGRlMCQAAAA==
name | My Calendars
color | auto
hexColor |
groupClassId | 0006f0b7-0000-0000-c000-000000000046
isDefaultCalendar | false
changeKey | fJKVL07sbkmIfHqjbDnRgQACxSYY4A==
canShare | true
canViewPrivateItems | true
canEdit | true
defaultOnlineMeetingProvider | teamsForBusiness
isTallyingResponses | false
isRemovable | true
```

</TabItem>
</Tabs>
7 changes: 7 additions & 0 deletions docs/src/config/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1303,6 +1303,13 @@ const sidebars: SidebarsConfig = {
{
'Outlook (outlook)': [
{
calendar: [
{
type: 'doc',
label: 'calendar add',
id: 'cmd/outlook/calendar/calendar-add'
}
],
calendargroup: [
{
type: 'doc',
Expand Down
1 change: 1 addition & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default {
'https://graph.microsoft.com/AuditLog.Read.All',
'https://graph.microsoft.com/Bookings.Read.All',
'https://graph.microsoft.com/Calendars.Read',
'https://graph.microsoft.com/Calendars.ReadWrite',
'https://graph.microsoft.com/ChannelMember.ReadWrite.All',
'https://graph.microsoft.com/ChannelMessage.Read.All',
'https://graph.microsoft.com/ChannelMessage.ReadWrite',
Expand Down
1 change: 1 addition & 0 deletions src/m365/outlook/commands.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const prefix: string = 'outlook';

export default {
CALENDAR_ADD: `${prefix} calendar add`,
CALENDARGROUP_LIST: `${prefix} calendargroup list`,
MAIL_SEARCHFOLDER_ADD: `${prefix} mail searchfolder add`,
MAIL_SEND: `${prefix} mail send`,
Expand Down
Loading