Skip to content

New command: outlook calendar set #7117

Description

@Jwaegebaert

Usage

m365 outlook calendar set [options]

Description

Updates a calendar for a user or a group

Options

Option Description
-i, --id <id> ID of the calendar.
-n, --name [name] New name of the calendar.
--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.
--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.
--isDefault [isDefault] Mark the default if it is the user's default. Allowed values: true, false.

Examples

Update the name of a calendar for the signed-in user

m365 outlook calendar set --id 'AAMkAGI2TQpZAAA=' --userId '@meId' --name 'Team planning'

Change the color of a specific calendar for a user by UPN

m365 outlook calendar set --id 'AAMkAGI2TQpZAAA=' --userName 'john.doe@contoso.com' --color 'lightGreen'

Mark a calendar as the default calendar for a user

m365 outlook calendar set --id 'AAMkAGI2TQpZAAA=' --userId '@meId' --isDefault true

Additional Info

  • Is it possible to get the calendar groups of someone else while using delegated permissions? If not, we should make sure the user cannot pass any user-related options.

API: https://learn.microsoft.com/en-us/graph/api/calendar-update?view=graph-rest-1.0&tabs=http

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions