OverviewProductsPlatformsAPI ReferenceResources
All platforms

Microsoft

Email & Calendar

Connect a Microsoft 365 or Outlook.com account and read and send Outlook mail, manage Outlook Calendar events, work with OneDrive files and sync Outlook contacts.

Authentication details

Connecting accounts guide
OAuth 2.0 (Microsoft)

Connect endpoints

Read the full connect steps in the guide

Connect a person's Microsoft account once and use their Outlook mail, Outlook Calendar, OneDrive and Outlook contacts with your Zernio API key, through Microsoft Graph.

Quick reference

A connected account uses platform: "microsoft" and represents one mailbox. You choose which of the four areas it grants when you connect it.

PropertyValue
Platform valuemicrosoft
Areasemail (Outlook mail), calendar (Outlook Calendar), files (OneDrive), contacts (Outlook contacts)
Account typesWork or school accounts (Microsoft 365) and personal accounts (Outlook.com, Hotmail)
AuthOAuth 2.0 with Microsoft sign-in, scopes required
OrganizationsSome tenants need an administrator to approve Zernio once. See Admin consent. An organization connection lets an administrator grant every mailbox at once
EmailList, search, read, send, reply, forward, move, trash, categories, drafts, scheduled send, tracking, send-as and signatures. 1,000 sends a day, doubling after 14 clean days
CalendarEvents with Teams meetings, RSVP, free-busy and availability
FilesEvery OneDrive file the user can reach
ContactsSynced into /v1/contacts, read-only
InboxInbound and sent mail appears as conversations, with message.received
Webhooksmessage.received, email.*, calendar.event.*, file.*, contact.*, account.rate_limited
Social postingNo
List the accountsGET /v1/accounts?platform=microsoft

Before you start

  • The person connecting needs a Microsoft 365 work or school account, or a personal Outlook.com account.
  • Mailboxes on on-premises Exchange servers are not supported.
  • Many organizations only let an administrator approve apps that read mail. Plan for admin consent when you sell to companies.

Connect

Call GET /v1/connect/microsoft with profileId and the areas you need in scopes, such as scopes=email,calendar, and send the user to the returned authUrl. See Connect.

To ask for the address first and route any mailbox, use the hosted email connect link from GET /v1/connect/email. Gmail and Microsoft addresses go to their sign-in, every other mailbox connects over IMAP.

Common errors

ErrorCauseFix
400 invalid_field_value on connectscopes is missingPass a subset of email, calendar, files, contacts.
412 admin_consent_requiredThe organization requires an administrator to approve ZernioSend an administrator the admin consent link.
412 mailbox_not_availableThe Microsoft 365 user has no Exchange Online mailbox (no Exchange license, inactive, soft-deleted or on-premises). Every mail and calendar request answers it, and GET /v1/accounts/{accountId}/health reports mailbox.reason: no_mailboxAssign an Exchange license to the user, or connect a user that has a mailbox. Files are not affected.
412 account_scope_missingThe account was connected without the area this call needsConnect again with that area added to scopes.

In this section

Was this page helpful?

On this page