Guide

Outlook Calendar CLI: Manage Events

Use an Outlook Calendar CLI to list events, create meetings, check availability, and book rooms from terminal without Graph API or Azure AD setup. This guide covers Outlook calendar CRUD, free/busy lookup, and Teams conferencing details from the terminal in a single OAuth2 flow.

Written by Caleb Geene Director, Site Reliability Engineering

Reviewed by Hazik

VerifiedCLI 3.1.1 · Outlook Calendar · last tested April 11, 2026

How do you use an Outlook Calendar CLI from terminal?

Connect Microsoft 365 once, then use nylas calendar events list, nylas calendar events create, and nylas calendar availability find. This gives you an Outlook Calendar CLI workflow without registering an Azure AD app or writing Graph API code.

Most Fortune 500 companies run on Microsoft 365.

According to Microsoft's Ignite 2024 announcement, nearly 70% of the Fortune 500 use Microsoft 365 Copilot alone — meaning overall Microsoft 365 adoption is even higher. That means most enterprise calendar workflows hit the Graph API sooner or later. And the Graph API isn't casual. You register an Azure AD application, configure delegated permissions like Calendars.ReadWrite, handle OAuth2 token exchange with PKCE, then call GET /me/events with a Bearer token. That's four steps before your first query.

Application permissions (the daemon/service auth flow) require a different grant type entirely. Per Microsoft Graph calendar permissions, most read/write calendar operations need delegated permissions unless you are building a background service with admin consent, and Graph itself enforces a 10,000-request-per-10-minute ceiling per mailbox. The Nylas CLI collapses the auth, scope, and throttling work into nylas init.

Graph API vs. Nylas CLI

Microsoft Graph API requires an Azure AD app registration, OAuth2 token exchange, and per-tenant permission grants before a script can read a single calendar event. The Nylas CLI reduces that initial setup from roughly 15-30 minutes to under 2 minutes by handling auth, scopes, and token refresh in one command. Each calendar operation maps to a single CLI command instead of a multi-step API call.

TaskMicrosoft Graph APINylas CLI
Initial setupRegister Azure AD app, configure permissions, get tenant IDbrew install nylas/nylas-cli/nylas && nylas init
AuthenticationImplement OAuth2 PKCE flow, handle token refreshnylas auth login (browser-based OAuth2)
List eventsGET /me/events with Bearer token and query paramsnylas calendar events list
Create eventPOST /me/events with JSON bodynylas calendar events create --title "..."
Book a roomPOST /me/findRooms + add room as attendee--participant room@company.com
Check availabilityPOST /me/calendar/getSchedule with JSON bodynylas calendar availability check
Provider lock-inMicrosoft onlyWorks with Google, Yahoo, iCloud, Exchange, IMAP too
Time to first API call15-30 minutesUnder 2 minutes

1. Install and connect your Microsoft 365 account

Connecting a Microsoft 365 account to the Nylas CLI takes one Homebrew install and one init command — roughly 90 seconds from start to finish. The init wizard handles OAuth2, scope configuration, and token storage without requiring an Azure AD app registration or a .env file. For shell, PowerShell, or Go install methods, see the getting started guide.

brew install nylas/nylas-cli/nylas
nylas init

The wizard creates a Nylas account and walks you through connecting Microsoft 365 via OAuth2. Once the browser consent flow completes, the CLI stores your grant locally and refreshes tokens automatically.

2. Core Outlook calendar commands

Outlook calendar CRUD covers four operations: list events, create events, update existing occurrences, and delete events when the mailbox policy allows it. Each command maps to one Graph API endpoint — GET /me/events, POST /me/events, PATCH /me/events/{id}, DELETE /me/events/{id} — but runs as a single CLI call instead of a multi-step HTTP request with Bearer tokens. On Microsoft 365 accounts, the CLI handles token refresh automatically for the default 3600-second token lifetime.

# List upcoming events on your default calendar
nylas calendar events list --days 14

# Create an event on a delegated executive calendar
nylas calendar events create \
  --calendar cal_exec_assistant \
  --title "Board Prep" \
  --start "2026-04-10 09:00" \
  --end "2026-04-10 10:00" \
  --participant chief-of-staff@company.com

# Reschedule a Microsoft 365 event
nylas calendar events update event_abc123 \
  --start "2026-04-10 11:00" \
  --end "2026-04-10 12:00"

# Delete an event by ID
nylas calendar events delete event_abc123

If the mailbox owner delegated access through Outlook but you still cannot write to the calendar, verify the exact calendar_id and mailbox policy before blaming the command. That is a Microsoft 365 permissions problem, not a CLI syntax problem.

3. Shared calendars and delegation

Shared calendars in Microsoft 365 let teams, projects, and departments coordinate on a single calendar surface without forwarding individual invites. According to Microsoft Graph calendar permissions, accessing another user's calendar requires either delegated permissions with the user's consent or application-level permissions granted by a tenant admin. The CLI abstracts this once your grant has the right scopes — a single nylas calendar list shows every calendar your grant can reach, including shared and delegated ones.

# See all calendars (personal + shared + delegated)
nylas calendar list

# List events on a shared team calendar
nylas calendar events list --calendar cal_shared_marketing

# Create an event on a delegated calendar
nylas calendar events create \
  --calendar cal_exec_assistant \
  --title "Board Prep" \
  --start "2026-04-10 09:00" \
  --end "2026-04-10 10:00"

4. Executive assistant and delegated-calendar workflows

Executive assistants and operations leads often manage 3-5 delegated Outlook calendars simultaneously, creating and moving meetings on behalf of executives throughout the day. This delegation pattern is specific to Microsoft 365 — iCloud and Yahoo don't support person-to-person calendar delegation at all. The CLI lets an assistant target any delegated calendar by its calendar_id without switching accounts or re-authenticating.

# Pull the exact delegated calendar IDs you can access
nylas calendar list --json | \
  jq -r '.[] | "\(.name) | read_only=\(.read_only) | id=\(.id)"'

# Create a meeting on an executive's delegated calendar
nylas calendar events create \
  --calendar cal_exec_assistant \
  --title "Board Prep" \
  --start "2026-04-10 09:00" \
  --end "2026-04-10 10:00" \
  --participant chief-of-staff@company.com

If the mailbox owner delegated access through Outlook but you still cannot write to the event, the issue is usually permission scope or mailbox policy, not the CLI command.

5. Teams meeting links

Microsoft Teams has over 320 million monthly active users as of Microsoft's January 2024 report, and most Outlook calendar events with participants auto-generate a Teams join link. When the Nylas CLI creates an event on a Microsoft 365 account, the conferencing details — join URL, meeting ID, and passcode — appear in the event response. Pipe the output through --json and jq to extract the link programmatically.

nylas calendar events create \
  --title "Weekly Standup" \
  --start "2026-04-07 09:00" \
  --end "2026-04-07 09:30" \
  --participant dev-team@company.com \
  --json | jq '.conferencing'

This replaces the manual Graph API flow of creating an onlineMeeting resource and attaching it to the event.

6. Outlook categories and recurring events

Outlook calendars support up to 25 color-coded categories per tenant — default labels like Blue, Red, and Green plus custom names such as "Client Meetings" or "Internal Reviews." Categories sync across Outlook desktop, Outlook on the web, and Outlook mobile. When the Nylas CLI fetches events as JSON, each event's metadata includes its category assignments, making it possible to filter or report on category usage in scripts.

# View event details including categories
nylas calendar events list --json | jq '.[] | {title: .title, categories: .metadata}'

Recurring events

Outlook represents recurring events using RRULE (RFC 5545). A weekly standup, for instance, is a single master event with an RRULE like FREQ=WEEKLY;BYDAY=MO;COUNT=52. When you list events, the CLI returns individual occurrences, not the raw RRULE. Updating a single occurrence changes only that instance; updating the master event changes the series.

# Update a single occurrence
nylas calendar events update event_abc123_20260407 \
  --title "Standup (Cancelled)" \
  --start "2026-04-07 09:00" \
  --end "2026-04-07 09:00"

# Delete an entire recurring series by its master ID
nylas calendar events delete event_abc123

When to use the Exchange guide instead

If your main problem is room mailboxes, on-prem Exchange, hybrid coexistence, or EWS migration pressure, you are really in Exchange territory rather than pure Outlook/M365 tenant workflows. Use the Exchange calendar guide for that estate-management path.

7. Check availability and find time

Checking free/busy status across Outlook calendars normally requires calling the Graph API's POST /me/calendar/getSchedule endpoint with a JSON body specifying each attendee's email and a time window. The Nylas CLI replaces that with a single command that returns availability in plain text or JSON. For multi-participant scheduling, the availability find subcommand scans all participants' calendars and returns open slots that fit a given duration — useful when coordinating across 3 or more busy schedules.

# Your availability for the next 7 days
nylas calendar availability check

# Find a 30-minute slot with two coworkers
nylas calendar availability find \
  --participants alice@company.com,bob@company.com \
  --duration 30

Example output

$ nylas calendar availability find --participants alice@company.com,bob@company.com --duration 30

Available slots:

1. Tue, Apr 1, 2026, 11:00 AM - 11:30 AM
   All participants free

2. Tue, Apr 1, 2026, 3:00 PM - 3:30 PM
   All participants free

Found 2 slot(s)

8. JSON output for scripting

JSON output from Outlook calendar commands feeds directly into morning briefing scripts, room-usage audits, and escalation tooling. Every calendar command in the Nylas CLI accepts a --json flag that returns the full event payload — title, participants, conferencing links, calendar ID, and metadata — as a JSON array. Piping through jq lets a 4-line bash script count meetings, flag overloaded days (6 or more meetings), or format a daily digest for Slack.

# Count today's meetings
nylas calendar events list --days 1 --json | jq length

# Morning briefing script
#!/bin/bash
count=$(nylas calendar events list --days 1 --json | jq length)
echo "You have $count meetings today."
if [ "$count" -gt 6 ]; then
  echo "Heavy meeting day. Block focus time."
fi

9. Delegated calendars vs shared mailboxes

Microsoft 365 exposes at least 4 distinct calendar types — delegated calendars, shared mailboxes, resource calendars, and M365 group calendars — and each has different permission rules. Delegation is person-to-person access where one user grants another read/write rights to their calendar. Shared mailboxes behave like a separate identity with its own inbox and calendar. M365 groups are collaboration objects that carry their own calendar surface. These distinctions change how Outlook automations fail: a script that works on a delegated calendar may return a 403 on a shared mailbox if the grant lacks the right scope.

# Check which calendars your current Outlook grant can actually see
nylas calendar list --json | \
  jq -r '.[] | "\(.name) | read_only=\(.read_only) | id=\(.id)"'

If a script can list a calendar but cannot create an event, the issue is usually delegated permission scope or mailbox policy, not the command itself.

10. Conditional Access and tenant controls

Outlook calendar access sits behind Entra ID (formerly Azure AD) tenant policies that don't exist on consumer providers like Yahoo or iCloud. Conditional Access policies, MFA enforcement, disabled legacy authentication, tenant-wide consent requirements, and per-mailbox policies can all block otherwise valid calendar API calls. According to Microsoft's Conditional Access documentation, organizations can enforce location-based, device-based, and risk-based access controls on every Graph API request — including calendar operations.

When an Outlook automation works for one user and fails for another in the same tenant, the root cause is usually policy, not event data. The tenant may restrict which OAuth grants are allowed to act, whether shared mailbox access is enabled, or whether Teams conferencing details can be provisioned for a given user.

11. M365 groups and channel scheduling

M365 groups, Teams channels, and room lists each carry their own calendar surface that sits outside the "one account, one calendar" model used by Gmail, iCloud, or Yahoo. A single Microsoft 365 tenant can have hundreds of M365 groups, each with its own calendar that doesn't appear in a user's default mailbox view. Enterprise automations need to distinguish between a person's mailbox calendar, a group calendar, and a resource (room) calendar — all three return different calendar IDs from nylas calendar list.

# Pull calendar IDs first, then target the exact group or delegated calendar
nylas calendar list --json | \
  jq '.[] | {name: .name, id: .id}'

Next steps