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
Tokens do not cross clouds. These points are from Microsoft’s docs.
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
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
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
Outlook caps a mailbox at 10,000 requests per 10 minutes and 4 concurrent requests, per app. Honor Retry-After. Throttling limits
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.
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.
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 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.
Headless OAuth uses the app you registered for that cloud. Hosted connect covers worldwide Microsoft 365 the same way as Gmail.
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)No. Each cloud needs an app registered in that cloud’s portal. A token from one cloud is not valid on another.
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.
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.
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.
Tell us which Microsoft clouds your users are in. Personal accounts are on Outlook.com; government tenants on GCC High and DoD.