Google & Microsoft OAuth
Two-way calendar sync and unified email inbox via OAuth.
Last updated 2026-05-05
OAuth integration with Google Workspace and Microsoft 365 unlocks two features: two-way calendar sync (events created in CRMcy push to your provider, and the staff member's external events appear inline on their CRMcy calendar) and a unified email inbox (drafts written in CRMcy actually send through your real account so replies go to the right place). The OAuth handshake uses the standard authorization-code-with-PKCE flow; tokens are encrypted at rest with the tenant master key.
Required scopes for Google: calendar.events, gmail.send, gmail.modify (modify is for marking thread-as-read after import). For Microsoft: Calendars.ReadWrite, Mail.Send, Mail.ReadWrite. Tenants can connect a single workspace-wide app (admin consent) or per-staff personal accounts.
Related endpoints
POST /api/tenant/integrations/oauth/google/start— produce auth url.GET /api/tenant/integrations/oauth/google/callback— handshake completion.POST /api/tenant/integrations/oauth/microsoft/start— Microsoft equivalent.DELETE /api/tenant/integrations/oauth/:provider— revoke + delete tokens.
See the source at apps/web/src/app/(tenant)/settings/integrations/oauth and apps/api/src/integrations/oauth.