# Microsoft Graph Calendar API alternative

Source: https://developer.nylas.com/docs/cookbook/calendar/microsoft-graph-calendar-api/

Microsoft Graph is the native API for Outlook and Microsoft 365 calendars. It works well when Microsoft is your only provider and your team is comfortable with Azure app registration, Graph permissions, Microsoft authentication library token handling, admin consent, subscriptions, and Windows time zone names.

Nylas is the shorter path when your product needs Microsoft calendars plus Google, iCloud, or Exchange. You connect a Microsoft account once, store a grant ID, and use the same Calendar API shape you use for every other provider.

## Connect a Microsoft calendar account

Start with a Microsoft grant. A grant represents one connected Outlook or Microsoft 365 account, and every Calendar API request uses that grant ID in the path.

For enterprise Microsoft tenants, expect admin consent and publisher verification to matter. The [Microsoft admin approval guide](/docs/provider-guides/microsoft/admin-approval/) covers the tenant-admin flow, and [Microsoft publisher verification](/docs/provider-guides/microsoft/verification-guide/) covers production setup.

For read-only calendar access, configure `Calendars.Read`. For event creation, updates, deletes, and invitation responses, configure `Calendars.ReadWrite`. Include `offline_access` so the grant can refresh provider tokens over time.

## List Outlook calendar events

List events with `GET /v3/grants/{grant_id}/events` and a `calendar_id`. Use `primary` for the default calendar.

```bash
curl --request GET \
  --url 'https://api.us.nylas.com/v3/grants/<NYLAS_GRANT_ID>/events?calendar_id=primary&limit=10' \
  --header 'Authorization: Bearer <NYLAS_API_KEY>'
```

```js [microsoftGraphAlternative-Node.js SDK]
const events = await nylas.events.list({
  identifier: grantId,
  queryParams: {
    calendarId: "primary",
    limit: 10,
  },
});
```

```python [microsoftGraphAlternative-Python SDK]
events = nylas.events.list(
    grant_id,
    query_params={
        "calendar_id": "primary",
        "limit": 10,
    },
)
```

The response uses the Nylas event schema, with normalized fields for `title`, `description`, `when`, `participants`, `organizer`, `conferencing`, and recurrence. You don't need to parse Microsoft Graph's `dateTimeTimeZone` object or convert Windows time zone names in your application code.

## Nylas vs Microsoft Graph Calendar

| Concern | Microsoft Graph Calendar API | Nylas Calendar API |
| --- | --- | --- |
| Auth setup | Azure app, Graph permissions, Microsoft auth library, tenant consent | Hosted OAuth grant and API key |
| Calendar IDs | Microsoft-specific IDs | Provider ID exposed through one schema |
| Time zones | Windows names such as `Eastern Standard Time` | Time zone database names such as `America/New_York` |
| Providers | Microsoft only | Microsoft, Google, iCloud, and Exchange |
| Webhooks | Graph subscriptions with renewal | One Nylas webhook destination |
| Conferencing | Teams fields in Graph event objects | Unified `conferencing` object |

Direct Graph integration makes sense if your app is Microsoft-only and needs Graph-specific fields Nylas doesn't expose. Use Nylas when you need a provider-neutral calendar model or want to avoid building a second integration for Google.

## Create a Microsoft calendar event

Create Outlook events with the same [Create Event request](/docs/reference/api/events/create-event/) you use for Google.

```bash
curl --request POST \
  --url 'https://api.us.nylas.com/v3/grants/<NYLAS_GRANT_ID>/events?calendar_id=primary&notify_participants=true' \
  --header 'Authorization: Bearer <NYLAS_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
    "title": "Customer kickoff",
    "when": {
      "start_time": 1782918000,
      "end_time": 1782921600,
      "start_timezone": "America/New_York",
      "end_timezone": "America/New_York"
    },
    "participants": [
      { "email": "maya@example.com", "name": "Maya Patel" }
    ],
    "conferencing": {
      "provider": "Microsoft Teams",
      "autocreate": {}
    }
  }'
```

Set `notify_participants=true` when you want Microsoft to send invitations. Teams conferencing appears in the `conferencing` object on the created event.

## Sync Microsoft calendar changes

Subscribe to the event triggers to sync Outlook calendar changes without polling:

```bash
curl --request POST \
  --url 'https://api.us.nylas.com/v3/webhooks/' \
  --header 'Authorization: Bearer <NYLAS_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
    "trigger_types": [
      "event.created",
      "event.updated",
      "event.deleted",
      "grant.expired"
    ],
    "webhook_url": "https://app.example.com/webhooks/nylas",
    "description": "Microsoft calendar sync"
  }'
```

This replaces Graph subscription renewal logic with one Nylas webhook destination. If the same app also has Google grants, the same endpoint can process both providers.

## Things to know about Microsoft calendar data

**Admin consent is common.** Many Microsoft 365 tenants block user consent for third-party apps. Plan an admin-consent flow for enterprise customers.

**All-day events use exclusive end dates.** A one-day event starts on the selected date and ends on the next date. Use that model in your display logic.

**Recurring event edits differ from Google.** Microsoft can remove overrides when you change the parent recurrence pattern. Test recurrence editing against Microsoft if you support both providers.

**Calendar IDs are long but stable.** Use `primary` for the default calendar. Store returned IDs for secondary calendars.

## What's next

- [List Microsoft calendar events](/docs/cookbook/calendar/events/list-events-microsoft/) for deeper provider-specific behavior
- [Create Microsoft calendar events](/docs/cookbook/calendar/events/create-events-microsoft/) for write scopes, Teams, and attendee notifications
- [Sync calendar events with webhooks](/docs/cookbook/calendar/calendar-webhooks/) for real-time event sync
- [Microsoft admin approval](/docs/provider-guides/microsoft/admin-approval/) for enterprise consent
- [Events API reference](/docs/reference/api/events/) for endpoint details