Skip to main content

outlook calendar add

Creates a new calendar for a user

Usage

m365 outlook calendar add [options]

Options

--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.

-h, --help [help]

Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, permissions, response, full. Default is options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Permissions

ResourcePermissions
Microsoft GraphCalendars.ReadWrite

Examples

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

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

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

Response

{
"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"
}
}