Guide

Manage Exchange Calendar from the CLI

Exchange calendar management comes with three options today: EWS (deprecated for Exchange Online in October 2026), PowerShell admin modules that require elevated privileges, or the Microsoft Graph API with Azure AD app registration. The Nylas CLI bypasses all three. It works across Gmail, Outlook, Exchange, Yahoo, iCloud, and IMAP providers through a single interface.

Written by Prem Keshari Senior SRE

Reviewed by Hazik

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

Exchange calendar access shouldn't require 80 lines of code

You want to list today's meetings, book a conference room, or check a colleague's availability. In Exchange, that means picking one of three paths:

  1. EWS (Exchange Web Services) — SOAP-based API that Microsoft is shutting down for Exchange Online in October 2026 (announcement MC862873). On-prem Exchange Server keeps EWS, but online tenants lose it.
  2. PowerShell — The ExchangeOnlineManagement module requires admin credentials. The Get-CalendarDiagnosticLog and Get-CalendarProcessing cmdlets are admin-only tools, not user-level calendar access.
  3. Microsoft Graph API — Register an Azure AD app, configure Calendars.ReadWrite permissions, handle OAuth2 token acquisition and refresh, then parse OData JSON responses with $top/$skip pagination.

The Nylas CLI handles the protocol layer. You run nylas calendar events list and get your events. Same command whether you're on Exchange Online, on-prem Exchange Server 2016/2019, or a hybrid deployment.

1. Install

Run brew install nylas/nylas-cli/nylas (or see the getting started guide for other methods). Exchange connectivity requires no additional packages -- Nylas handles EWS and Graph API protocols internally.

2. Connect your Exchange account

Create an application at dashboard-v3.nylas.com and connect your Exchange account. Nylas supports Exchange Online (Microsoft 365) and on-premises Exchange Server. Then authenticate the CLI:

nylas auth config
# Paste your API key when prompted

# Verify the connection
nylas auth whoami
# => Authenticated as you@company.com (Exchange)

3. Room booking and resource calendars

Exchange room mailboxes are one of the main reasons this page exists separately from the Outlook one. Conference rooms, equipment mailboxes, and resource calendars behave like identities with booking policy, approval rules, and capacity constraints. In practice, Exchange automation fails here more often than on plain personal calendars.

# Book a conference room
nylas calendar events create \
  "conf-room-3b@company.com" \
  --title "Sprint Demo" \
  --start "2026-04-01 15:00" \
  --end "2026-04-01 16:00" \
  --participant team@company.com

# Check room availability before booking
nylas calendar availability find \
  --participants conf-room-3b@company.com \
  --duration 60

4. Shared calendars and service identities

Exchange estates also lean heavily on shared calendars, executive assistants, operations mailboxes, and service accounts. Connect those identities as separate grants so you can see exactly which mailbox owns the calendar and which scripts still depend on it.

# View a shared team calendar
nylas calendar events list "engineering-cal@company.com"

# Add an event to a shared calendar mailbox
nylas calendar events create \
  "engineering-cal@company.com" \
  --title "Release v4.2" \
  --start "2026-04-10" \
  --all-day

# Inventory the identities your automation depends on
nylas calendar list "executive-assistant@company.com"
nylas calendar list "shared-operations-cal@company.com"

5. Hybrid deployments and mailbox placement

Exchange is often an estate-management problem, not just a calendar API problem. Some mailboxes live in Exchange Online, others stay on-prem, and the same automation may need to touch both. The CLI matters here because the command surface stays stable even when the transport changes under the hood.

# Cloud mailbox
nylas calendar events list "cloud-user@company.com"

# On-prem mailbox (same command, different routing)
nylas calendar events list "onprem-user@company.com"

# Book a room that's on-prem while your account is in the cloud
nylas calendar events create \
  "boardroom@company.com" \
  --title "Quarterly Review" \
  --start "2026-04-15 10:00" \
  --end "2026-04-15 12:00"

This is where Exchange diverges hard from Outlook. Outlook is usually a Microsoft 365 tenant-policy story. Exchange is often coexistence, autodiscover, and mailbox-placement reality.

6. EWS deprecation and migration pressure

Exchange-specific calendar automation now has a deadline the Google, Yahoo, and iCloud guides do not share. If a workflow still assumes direct EWS access for Exchange Online, it needs a migration path before Microsoft's October 2026 cutoff. On-prem Exchange keeps EWS, but mixed estates rarely stay simple for long.

Treat every Exchange automation as two questions: what happens for cloud mailboxes, and what happens for the on-prem exceptions that remain?

7. Core Exchange calendar commands

Once you know which mailbox owns the workflow, the basic commands stay short:

# List upcoming events
nylas calendar events list --days 14 --show-tz

# Create a standard meeting
nylas calendar events create \
  --title "Architecture Review" \
  --start "2026-04-01 14:00" \
  --end "2026-04-01 15:00" \
  --participant alice@company.com

# Reschedule an event
nylas calendar events update event_abc123 \
  --title "Architecture Review (Rescheduled)" \
  --start "2026-04-01 15:00" \
  --end "2026-04-01 16:00"

# Delete an event
nylas calendar events delete event_abc123

8. Availability and JSON output

Exchange free/busy lookups normally require the GetUserAvailability EWS operation or the Graph API's /calendar/getSchedule endpoint. The CLI wraps both, and JSON output is what makes the results usable in audits and migration reporting.

# Check your own availability
nylas calendar availability check

# Find mutual availability across participants
nylas calendar availability find \
  --participants alice@company.com,bob@company.com \
  --duration 30

# Count meetings with no room assigned
nylas calendar events list --days 14 --json | \
  jq '[.[] | select(.location == null or .location == "")] | length'

EWS vs Graph API vs Nylas CLI

How the three approaches compare for common calendar operations:

ConcernEWSMicrosoft GraphNylas CLI
Setup time~30 min (SOAP endpoint + autodiscover)~60 min (Azure AD app + OAuth2 + permissions)~5 min (dashboard + API key)
List eventsFindItem SOAP call (~40 lines XML)GET /me/calendar/events (~60 lines with auth)nylas calendar events list
Create eventCreateItem SOAP call (~50 lines XML)POST /me/events (~40 lines JSON + auth)nylas calendar events create
Free/busy lookupGetUserAvailability (~35 lines)POST /calendar/getSchedule (~30 lines)nylas calendar availability check
Room bookingFindRooms + CreateItem (~60 lines)findRooms + POST /events (~50 lines)nylas calendar events create room@co
AuthenticationNTLM, Basic, or OAuth2OAuth2 onlyHandled by Nylas
Exchange OnlineUntil Oct 2026YesYes
On-prem supportYesNoYes (via EWS internally)
PaginationIndexedPageItemView$top / $skip / @odata.nextLink--limit flag
Deprecation riskHigh (Oct 2026 for Online)LowNone (Nylas abstracts)

Exchange-specific tips

Recurring meetings

Exchange handles recurrence through the Recurrence element in EWS or the recurrence property in Graph. The CLI creates recurring events with flags:

# Weekly standup
nylas calendar events create \
  --title "Team Standup" \
  --start "2026-04-06 09:00" \
  --end "2026-04-06 09:15" \
  --recurrence "weekly" \
  --participant team@company.com

# Biweekly 1:1
nylas calendar events create \
  --title "1:1 with Manager" \
  --start "2026-04-07 11:00" \
  --end "2026-04-07 11:30" \
  --recurrence "biweekly"

Teams meeting integration

Events created through Exchange Online can include Teams meeting links. When Nylas creates an event with participants on an Exchange Online tenant that has Teams enabled, the Teams meeting link is generated automatically by Exchange. The link appears in the event body and the onlineMeeting property when you list the event with --json.

# Create an event (Teams link added automatically by Exchange)
nylas calendar events create \
  --title "Design Review" \
  --start "2026-04-03 14:00" \
  --end "2026-04-03 15:00" \
  --participant remote-team@company.com

# Check for the Teams link in JSON output
nylas calendar events list --json | \
  jq '.[] | select(.conferencing != null) | {title: .title, link: .conferencing.details.url}'

Autodiscover and legacy topology pain

Exchange teams deal with a class of problems the Outlook and Google guides barely touch: autodiscover, hybrid routing, legacy namespaces, and mailbox placement. On older estates, the real blocker is often discovering which Exchange endpoint or auth path a mailbox still relies on. That complexity is exactly why Exchange admins keep a mental map of coexistence servers, resource forests, and on-prem exceptions.

This is also why the Exchange page stays relevant even if Outlook users move to Graph. Outlook is a cloud product problem. Exchange is often an estate-management problem.

Service accounts and impersonation boundaries

Exchange organizations also tend to rely on shared service accounts, room resources, and delegated assistants more heavily than personal-calendar ecosystems. If your legacy scripts were built around EWS impersonation, the important migration question is not just "how do I list events?" but "which identity should keep doing this after EWS disappears for Exchange Online?"

# Separate grants keep room, shared, and user calendars distinct
nylas calendar events list "executive-assistant@company.com"
nylas calendar events list "room-board-12@company.com"
nylas calendar events list "shared-project-cal@company.com"

Exchange migration checklist for calendar automations

For Exchange estates, calendar scripting is rarely just about one user mailbox. Audit every automation that books rooms, reads shared calendars, or checks free/busy for assistants and resource accounts. Then separate them into cloud-only, on-prem-only, and hybrid paths. That kind of migration inventory is unique to Exchange. Google, Yahoo, and iCloud calendars do not have the same split-brain deployment reality.

# Inventory the identities your Exchange automations actually depend on
nylas calendar list "executive-assistant@company.com"
nylas calendar list "boardroom@company.com"
nylas calendar list "shared-operations-cal@company.com"

Next steps