Skip to main content

outlook event add

Create an event in the default calendar or a specific calendar of a user

Usage​

m365 outlook event add [options]

Options​

--subject <subject>

Subject of the event.

--start <start>

Start date and time in format {date}T{time} (for example 2026-02-10T09:00:00).

--end <end>

End date and time in format {date}T{time} (for example 2026-02-10T09:30:00).

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

--calendarId [calendarId]

ID of the calendar. Specify either calendarId or calendarName, but not both.

--calendarName [calendarName]

Name of the calendar. Specify either calendarId or calendarName, but not both.

--allowNewTimeProposals [allowNewTimeProposals]

true if the organizer allows invitees to propose a new time when responding; otherwise, false. Default is true.

--bodyContents [bodyContents]

Body content of the event. You can also load from a file using @filePath.

--bodyContentType [bodyContentType]

Type of the body content. Available options: Text, HTML. Default is HTML.

--categories [categories]

Comma-separated list of categories.

--hideAttendees [hideAttendees]

When set to true, each attendee only sees themselves in the meeting request and meeting tracking list. Default is false.

--importance [importance]

Importance of the event. Available options: low, normal, high.

--isAllDay [isAllDay]

Set to true if the event lasts all day.

--isOnlineMeeting [isOnlineMeeting]

Set to true to create the event as an online meeting. Default is false.

--isReminderOn [isReminderOn]

Set to false if an alert is set to not remind the user of the event. Default is true.

--location [location]

Location display name of the event (maps to location.displayName). Specify either location or locations, but not both.

--locationEmailAddress [locationEmailAddress]

Optional email address of the location (maps to location.locationEmailAddress). Requires location.

--locations [locations]

Comma-separated list of location display names (maps to locations[].displayName). Specify either location or locations, but not both.

--onlineMeetingProvider [onlineMeetingProvider]

Online meeting provider. Available options: teamsForBusiness, skypeForBusiness, skypeForConsumer, unknown. Default is unknown.

--optionalAttendees [optionalAttendees]

Comma-separated list of optional attendee email addresses.

--recurrence [recurrence]

Recurrence definition as JSON string. You can also load from a file using @filePath.

--reminderMinutesBeforeStart [reminderMinutesBeforeStart]

The number of minutes before the event start time that the reminder alert occurs.

--requiredAttendees [requiredAttendees]

Comma-separated list of required attendee email addresses.

--resources [resources]

Comma-separated list of resource attendee email addresses (added as resource attendees).

--responseRequested [responseRequested]

Default is true, which represents the organizer would like an invitee to send a response to the event.

--sensitivity [sensitivity]

Sensitivity of the event. Available options: normal, personal, private, confidential.

--showAs [showAs]

Status to show. Available options: free, tentative, busy, oof, workingElsewhere, unknown. Default is busy.

--timeZone [timeZone]

Time zone used for the event start and end. If not specified, the start and end times are in UTC.

--transactionId [transactionId]

Custom identifier to help avoid redundant POST operations in case of client retries.

-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
note
  • --timeZone is used to set the start.timeZone and end.timeZone values in the request. If you pass only start and end without timeZone, the default is UTC.
  • For --isAllDay true, set start and end to midnight values and keep them in the same time zone.
  • When using application permissions, specify either --userId or --userName.
  • After creating an online meeting by setting isOnlineMeeting and onlineMeetingProvider, you can’t change those values later.

Examples​

Create an event in the default calendar of the current signed-in user.

m365 outlook event add --subject "Weekly sync" --start "2026-02-10T09:00:00" --end "2026-02-10T09:30:00"

Create an event for a specific user using their UPN.

m365 outlook event add --userName "john.doe@contoso.com" --subject "Sprint review" --start "2026-02-10T14:00:00" --end "2026-02-10T15:00:00" --timeZone "Pacific Standard Time"

Create an event in a specific calendar of a user.

m365 outlook event add --userName "john.doe@contoso.com" --calendarId "AAMkAGRkZ" --subject "Release planning" --start "2026-02-12T10:00:00" --end "2026-02-12T11:30:00"

Create an event with required and optional attendees, categories, and a reminder.

m365 outlook event add --subject "Project kickoff" --start "2026-02-15T09:00:00" --end "2026-02-15T10:00:00" --requiredAttendees "alex@contoso.com,dana@contoso.com" --optionalAttendees "sam@contoso.com" --categories "Preset0,Preset6" --isReminderOn true --reminderMinutesBeforeStart 15

Create an all-day event with a physical location.

m365 outlook event add --subject "Company offsite" --start "2026-02-20T00:00:00" --end "2026-02-21T00:00:00" --isAllDay true --location "Head Office"

Create an online meeting using Microsoft Teams and disallow new time proposals.

m365 outlook event add --subject "Customer demo" --start "2026-02-18T13:00:00" --end "2026-02-18T14:00:00" --isOnlineMeeting true --onlineMeetingProvider teamsForBusiness --allowNewTimeProposals false

Create a recurring weekly event using a recurrence definition loaded from file.

m365 outlook event add --subject "Weekly status meeting" --start "2026-02-16T10:00:00" --end "2026-02-16T10:30:00" --recurrence @recurrence.json

Create an event with HTML body content loaded from a file and a custom transaction ID.

m365 outlook event add --subject "Town hall" --start "2026-02-25T16:00:00" --end "2026-02-25T17:30:00" --bodyContents @invite.html --bodyContentType HTML --transactionId "townhall-2026-02"

Response​

{
"id": "AQMkAGYzNjMxYTU4LTJjZjYtNDlhMi1iMzQ2LWVmMTU3YmUzOGM5MABGAAADMN-7V4K8g0q_adetip1DygcAxMBBaLl1lk_dAn8KkjfXKQAAAgENAAAAxMBBaLl1lk_dAn8KkjfXKQAGMVCCQQAAAA==",
"createdDateTime": "2026-04-04T11:03:22.881996Z",
"lastModifiedDateTime": "2026-04-04T11:05:26.2216557Z",
"changeKey": "xMBBaLl1lk+dAn8KkjfXKQAGLmp8jA==",
"categories": [],
"transactionId": "localevent:93639269-b1b2-d604-5170-283b0e470da5",
"originalStartTimeZone": "UTC",
"originalEndTimeZone": "UTC",
"iCalUId": "040000008200E00074C5B7101A82E0080000000051EE49A722C4DC0100000000000000001000000065853ABD35D4FE438112E0B9CF451ABF",
"uid": "040000008200E00074C5B7101A82E0080000000051EE49A722C4DC0100000000000000001000000065853ABD35D4FE438112E0B9CF451ABF",
"reminderMinutesBeforeStart": 15,
"isReminderOn": true,
"hasAttachments": false,
"subject": "New Product Regulations Touchpoint",
"bodyPreview": "New Product Regulations Strategy Online Touchpoint Meeting\r\\\n\r\\\nYou're receiving this message because you're a member of the Engineering group. If you don't want to receive any messages or events from this group, stop following it in your inbox.\r\\\n\r\\\n________",
"importance": "normal",
"sensitivity": "normal",
"isAllDay": false,
"isCancelled": false,
"isOrganizer": true,
"responseRequested": true,
"seriesMasterId": null,
"showAs": "busy",
"type": "singleInstance",
"webLink": "https://outlook.office365.com/owa/?itemid=AQMkAGYzNjMxYTU4LTJjZjYtNDlhMi1iMzQ2LWVmMTU3YmUzOGM5MABGAAADMN%2F7V4K8g0q%2Badetip1DygcAxMBBaLl1lk%2BdAn8KkjfXKQAAAgENAAAAxMBBaLl1lk%2BdAn8KkjfXKQAGMVCCQQAAAA%3D%3D&exvsurl=1&path=/calendar/item",
"onlineMeetingUrl": null,
"isOnlineMeeting": true,
"onlineMeetingProvider": "teamsForBusiness",
"allowNewTimeProposals": true,
"occurrenceId": null,
"isDraft": false,
"hideAttendees": false,
"responseStatus": {
"response": "organizer",
"time": "0001-01-01T00:00:00Z"
},
"body": {
"contentType": "html",
"content": "<html>\r\\\n<head>\r\\\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\\\n</head>\r\\\n<body>\r\\\n<div style=\"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)\">\r\\\nNew Product Regulations Strategy Online Touchpoint Meeting</div>\r\\\n<div style=\"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)\">\r\\\n<br>\r\\\n</div>\r\\\n<div style=\"font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)\">\r\\\nYou're receiving this message because you're a member of the Engineering group. If you don't want to receive any messages or events from this group, stop following it in&nbsp;your inbox.</div>\r\\\n<br>\r\\\n<div class=\"me-email-text\" lang=\"en-US\" style=\"max-width:1024px; color:#242424; font-family:'Segoe UI','Helvetica Neue',Helvetica,Arial,sans-serif\">\r\\\n<div aria-hidden=\"true\" style=\"margin-bottom:24px; overflow:hidden; white-space:nowrap\">\r\\\n________________________________________________________________________________</div>\r\\\n<div style=\"margin-bottom:12px\"><span class=\"me-email-text\" style=\"font-size:20px; color:#242424; font-weight:600\">Microsoft Teams meeting</span>\r\\\n</div>\r\\\n<div style=\"margin-bottom:6px\"><span class=\"me-email-text\" style=\"font-size:20px; color:#242424; font-weight:600\">Join:\r\\\n</span><a href=\"https://teams.microsoft.com/meet/48803137263631?p=YXe9K6OhVD94VIC23M\" id=\"meet_invite_block.action.join_link\" title=\"Meeting join\" aria-label=\"Meeting join\" class=\"me-email-link\" style=\"font-size:20px; text-decoration:underline; color:#5B5FC7\">https://teams.microsoft.com/meet/48803137263631?p=YXe9K6OhVD94VIC23M</a>\r\\\n</div>\r\\\n<div style=\"margin-bottom:6px\"><span class=\"me-email-text-secondary\" style=\"font-size:14px; color:#616161\">Meeting ID:\r\\\n</span><span class=\"me-email-text\" style=\"font-size:14px; color:#242424\">488 031 372 636 31</span>\r\\\n</div>\r\\\n<div style=\"margin-bottom:32px\"><span class=\"me-email-text-secondary\" style=\"font-size:14px; color:#616161\">Passcode:\r\\\n</span><span class=\"me-email-text\" style=\"font-size:14px; color:#242424\">uN2Np6PN</span>\r\\\n</div>\r\\\n<div style=\"margin-bottom:12px; max-width:1024px\">\r\\\n<hr style=\"border:0; background:#616161; height:1px\">\r\\\n</div>\r\\\n<div style=\"margin-bottom:24px\"><a href=\"https://aka.ms/JoinTeamsMeeting?omkt=en-US\" id=\"meet_invite_block.action.help\" class=\"me-email-link\" style=\"font-size:14px; text-decoration:underline; color:#5B5FC7\">Need help?</a>\r\\\n<span style=\"color:#616161\">|</span> <a href=\"https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZjE4ZGNmODktODg3ZS00MTRjLTg4ZmMtZWMzMjBkZTE5YjBl%40thread.v2/0?context=%7b%22Tid%22%3a%22f2c94a41-d33d-4b60-bb3d-0bed4cdf9855%22%2c%22Oid%22%3a%229bd29c6c-181e-41f5-a1b6-bc30bbf652d3%22%7d\" id=\"meet_invite_block.action.join_link_compatibility\" class=\"me-email-link\" style=\"font-size:14px; text-decoration:underline; color:#5B5FC7\">\r\\\nSystem reference</a> </div>\r\\\n<div><span class=\"me-email-text-secondary\" style=\"font-size:14px; color:#616161\">For organizers:\r\\\n</span><a href=\"https://teams.microsoft.com/meetingOptions/?organizerId=9bd29c6c-181e-41f5-a1b6-bc30bbf652d3&amp;tenantId=f2c94a41-d33d-4b60-bb3d-0bed4cdf9855&amp;threadId=19_meeting_ZjE4ZGNmODktODg3ZS00MTRjLTg4ZmMtZWMzMjBkZTE5YjBl@thread.v2&amp;messageId=0&amp;language=en-US\" id=\"meet_invite_block.action.organizer_meet_options\" class=\"me-email-link\" style=\"font-size:14px; text-decoration:underline; color:#5B5FC7\">Meeting\r\\\n options</a> </div>\r\\\n<div style=\"margin-top:24px; margin-bottom:6px\"></div>\r\\\n<div style=\"margin-bottom:24px\"></div>\r\\\n<div aria-hidden=\"true\" style=\"margin-bottom:24px; overflow:hidden; white-space:nowrap\">\r\\\n________________________________________________________________________________</div>\r\\\n</div>\r\\\n</body>\r\\\n</html>\r\\\n"
},
"start": {
"dateTime": "2026-04-04T11:30:00.0000000",
"timeZone": "UTC"
},
"end": {
"dateTime": "2026-04-04T12:00:00.0000000",
"timeZone": "UTC"
},
"location": {
"displayName": "Microsoft Teams Meeting",
"locationType": "default",
"uniqueId": "Microsoft Teams Meeting",
"uniqueIdType": "private"
},
"locations": [
{
"displayName": "Microsoft Teams Meeting",
"locationType": "default",
"uniqueId": "Microsoft Teams Meeting",
"uniqueIdType": "private"
}
],
"recurrence": null,
"attendees": [
{
"type": "required",
"status": {
"response": "none",
"time": "0001-01-01T00:00:00Z"
},
"emailAddress": {
"name": "Debra Berger",
"address": "debraB@contoso.com"
}
}
],
"organizer": {
"emailAddress": {
"name": "John Doe",
"address": "john.doe@contoso.com"
}
},
"onlineMeeting": {
"joinUrl": "https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZjE4ZGNmODktODg3ZS00MTRjLTg4ZmMtZWMzMjBkZTE5YjBl%40thread.v2/0?context=%7b%22Tid%22%3a%22f2c94a41-d33d-4b60-bb3d-0bed4cdf9855%22%2c%22Oid%22%3a%229bd29c6c-181e-41f5-a1b6-bc30bbf652d3%22%7d"
}
}