Skip to content

How to create Exchange calendar events

Exchange on-premises servers remain widespread in enterprise environments, particularly in regulated industries, government, and organizations that have not yet migrated to Microsoft 365. Creating calendar events on these servers means talking to Exchange Web Services (EWS), a SOAP-based XML protocol that predates modern REST APIs.

Nylas abstracts the EWS complexity behind the same Events API you use for Google Calendar, Outlook, and iCloud. You send a JSON payload, and Nylas translates it into the correct EWS SOAP envelope, handles autodiscovery, and manages credentials. This guide covers the EWS-specific details you need to know when creating events on Exchange on-prem.

This is the first thing to figure out. The two provider types target different Exchange deployments:

Provider typeConnectorUse when
Microsoft GraphmicrosoftExchange Online, Microsoft 365, Office 365, Outlook.com
Exchange Web ServicesewsSelf-hosted Exchange servers (on-premises)

If the user’s calendar is hosted by Microsoft in the cloud, use the Microsoft guide instead. The ews connector is specifically for organizations that run their own Exchange servers.

Microsoft announced EWS retirement and recommends migrating to Microsoft Graph. However, many organizations still run on-premises Exchange servers where EWS is the only option. Nylas continues to support EWS for these environments.

Creating a calendar event through EWS means constructing a SOAP XML envelope with deeply nested elements for the event title, body, start and end times, timezone definitions, attendees, recurrence patterns, and reminders. A single create-event call can easily exceed 50 lines of XML. You also need to handle autodiscovery to find the correct EWS endpoint (which is frequently misconfigured), manage credential-based authentication with support for two-factor app passwords, parse SOAP fault responses when something goes wrong, and build retry logic around Exchange’s admin-configured throttling policies.

Nylas replaces all of that with a single POST request containing a JSON body. No XML, no WSDL, no SOAP. Authentication, autodiscovery, and timezone conversion are handled automatically. Your event-creation code stays the same whether you target Exchange on-prem, Exchange Online, Google Calendar, or iCloud.

If you have deep EWS experience and only target Exchange on-prem, direct integration is an option. For multi-provider calendar support or faster time-to-integration, Nylas is the simpler path.

You’ll need:

  • A Nylas application with a valid API key
  • A grant for an Exchange on-premises account
  • An EWS connector configured with the ews.calendars scope (read and write access)
  • The Exchange server accessible from outside the corporate network (not behind a VPN or firewall that blocks external access)

New to Nylas? Start with the quickstart guide to set up your app and connect a test account before continuing here.

EWS uses credential-based authentication. During the auth flow, users sign in with their Exchange credentials, typically the same username and password they use for Windows login. The username format is usually [email protected] or DOMAIN\username.

If EWS autodiscovery is configured on the server, Nylas automatically locates the correct EWS endpoint. If autodiscovery is disabled or misconfigured, users can click “Additional settings” during authentication and manually enter the Exchange server address (for example, mail.company.com).

Users with two-factor authentication must generate an app password instead of using their regular password. See Microsoft’s app password documentation for instructions.

The full setup walkthrough is in the Exchange on-premises provider guide.

Make a Create Event request with the grant ID and a calendar_id. You can use primary as the calendar_id to target the account’s default calendar.

You’re about to send a real event invite! The following samples send an email from the account you connected to the Nylas API to any email addresses you put in the participants sub-object. Make sure you actually want to send this invite to those addresses before running this command!

The calendar_id=primary shortcut works for EWS accounts, targeting the user’s default calendar. The response format is identical across providers, so your event-creation logic works the same for Exchange on-prem, Exchange Online, Google, and iCloud.

When you include a participants array in your create request, Exchange handles the meeting invitations through its internal mail transport. The notify_participants query parameter controls whether invitations are sent:

  • notify_participants=true (the default) sends a meeting invitation to every address in the participants array. Exchange delivers these through its own transport, not through a separate email send.
  • notify_participants=false creates the event on the organizer’s calendar without notifying anyone. Participants do not receive a message or an ICS file, and the event does not appear on their calendars.

This behavior is consistent with how Exchange handles meeting requests natively. One thing to watch for: if the participant is on the same Exchange server, the event may appear on their calendar almost instantly. External participants receive a standard ICS invitation email.

Exchange on-prem behaves differently from Exchange Online (Microsoft Graph) in several ways that matter when creating calendar events.

The ews.calendars scope on your EWS connector grants both read and write access to the Calendar API. Without this scope, create requests fail with a permissions error. You can configure scopes when setting up the connector:

ScopeAccess
ews.messagesEmail API (messages, drafts, folders)
ews.calendarsCalendar API
ews.contactsContacts API

EWS does not support automatically creating conferencing links (Teams, Zoom, or otherwise) when you create an event. If you need a video conferencing link on the event, generate it through the conferencing provider’s API first, then include the URL in the event’s location or description field. This is a platform limitation of Exchange on-prem, not a Nylas restriction.

Microsoft Exchange has specific constraints around recurring events that do not apply to Google Calendar:

  • No overlapping instances. You cannot reschedule an instance of a recurring event to fall on the same day as, or the day before, the previous instance. Exchange rejects the update to prevent overlapping occurrences within a series.
  • Overrides removed on recurrence change. If you modify the recurrence pattern of a series (for example, changing from weekly to daily), Exchange removes all existing overrides. Google keeps them if they still fit the new pattern.
  • EXDATE recovery is not possible. Once you remove an occurrence from a recurring series, there is no way to restore it. You would need to create a standalone event to fill the gap.
  • No multi-day monthly BYDAY. You cannot create a monthly recurring event on multiple days of the week (like the first and third Thursday). Exchange’s recurrence model does not support different indices within a single rule.

For the full breakdown of provider-specific recurring event behavior, see Recurring events.

Nylas accepts IANA timezone identifiers (like America/New_York or Europe/London) in your create request. You do not need to convert to Windows timezone IDs like “Eastern Standard Time.” Nylas handles the translation to Exchange’s internal format automatically.

Exchange supports booking room resources through the resources field on an event. If the room is configured as an Exchange resource mailbox, you can include it as a resource when creating the event. The resource mailbox’s auto-accept policy determines whether the room is automatically confirmed or requires approval.

The Exchange server’s EWS endpoint must be reachable from Nylas infrastructure. This is the most common source of connection failures for on-prem deployments.

  • EWS must be enabled on the server and exposed outside the corporate network
  • If the server is behind a firewall, you need to allow Nylas’s IP addresses (available on contract plans with static IPs)
  • A reverse proxy in front of the Exchange server is a common workaround if direct firewall rules are not feasible
  • Accounts in admin groups are not supported

If event creation is failing for an Exchange account, verify that the EWS endpoint is accessible before investigating other causes.

Unlike Google and Microsoft’s cloud services, Exchange on-prem rate limits are set by the server administrator. Write operations like event creation may be more restricted than read operations. Nylas cannot predict what the limits will be. If the Exchange server throttles a request, Nylas returns a Retry-After header with the number of seconds to wait.

For apps that create events frequently, consider batching operations and building backoff logic around the Retry-After response.

Created events depend on the EWS server’s responsiveness and network latency between Nylas infrastructure and the Exchange server. On-prem servers with high load or limited bandwidth may introduce noticeable delays before the event appears in sync results.

For apps that need confirmation that an event was created successfully, use webhooks to receive a notification as soon as the event syncs. This is more reliable than polling.