Providers

Microsoft Graph mail and calendar, including government clouds.

Commercial Microsoft 365, Outlook.com, GCC High and DoD each use that cloud’s own sign-in and Graph host. Workwae keeps the delta sync and the subscriptions.

What Microsoft requires

An app registration in the cloud you call.

Tokens do not cross clouds. These points are from Microsoft’s docs.

One app per cloud

Commercial and GCC use login.microsoftonline.com and graph.microsoft.com. GCC High and DoD use login.microsoftonline.us. 21Vianet uses login.chinacloudapi.cn. Graph deployments

Delegated permissions

Mail and send need Mail.ReadWrite and Mail.Send, calendar Calendars.ReadWrite, contacts Contacts.ReadWrite, plus offline access. Scopes use that cloud’s Graph host. Permissions reference

Change notifications

Outlook subscriptions expire. Message subscriptions last at most 10,080 minutes and have to be renewed. Lifecycle events ask for reauthorization or say the subscription was removed. Outlook notifications

Throttling

Outlook caps a mailbox at 10,000 requests per 10 minutes and 4 concurrent requests, per app. Honor Retry-After. Throttling limits

What Workwae does

Each account stays in its own cloud.

Delta sync

Mail sync is messages/delta per folder, with immutable ids, and one subscription on me/messages. Subscriptions renew at half their lifetime. Sync keeps at most 4 requests in flight per mailbox.

GCC High and DoD

Register an app in that cloud and pass its id when sign-in starts. Calls use graph.microsoft.us or dod-graph.microsoft.us. Personal Outlook.com accounts exist only in the worldwide cloud.

21Vianet

Message and folder delta are not available in the China cloud, so Graph mail sync does not run for 21Vianet yet. Those mailboxes connect over IMAP and SMTP on partner.outlook.cn, with that cloud’s token audience.

Calendar, contacts, app-only

Calendar uses calendarView/delta and a subscription on me/events. Contacts delta the Contacts folder. App-only access is an organization connection; paths are /users/{mailbox} because client-credentials tokens cannot call /me.

SDK

Start sign-in in the tenant’s cloud.

Headless OAuth uses the app you registered for that cloud. Hosted connect covers worldwide Microsoft 365 the same way as Gmail.

graph.tsgraph.py
const { authorizeUrl } = await workwae.oauthAuthorizations.create({
  provider: "microsoft",
  oauthAppId: gccHighApp.id, // your app registration for GCC High
  redirectUri: "https://app.example.com/mail/connected",
});

return redirect(authorizeUrl);
# Your own UI, the tenant's own Microsoft cloud
result = workwae.oauth_authorizations.create(
    provider="microsoft",
    oauth_app_id=gcc_high_app.id,  # your app registration for GCC High
    redirect_uri="https://app.example.com/mail/connected",
)

return redirect(result.authorize_url)
FAQ

Questions teams ask.

Can one app registration cover GCC High and commercial?

No. Each cloud needs an app registered in that cloud’s portal. A token from one cloud is not valid on another.

Does 21Vianet mail sync through Graph?

Not yet. Delta queries for messages and folders are not available there, so Workwae does not sync 21Vianet mail over Graph. Connect those mailboxes with IMAP and SMTP.

What about Exchange Server on-premises?

Mail only: a server that allows IMAP and SMTP connects as an IMAP account. Workwae has no EWS connector, so it does not read Exchange Server calendars or contacts. Exchange Online’s EWS retirement does not affect Workwae, which uses Microsoft Graph.

Do shared mailboxes work?

A delegated shared mailbox needs the Shared mail, send, calendar and contacts permissions you turn on. App-only organization connections open a mailbox with application permissions instead of /me.

Early access

Bring commercial and government tenants.

Tell us which Microsoft clouds your users are in. Personal accounts are on Outlook.com; government tenants on GCC High and DoD.