🚀 Feature: Support Microsoft Graph (OAuth2) as an outbound email provider
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 59.6k
- Forks
- 5.8k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 49
Description
Problem
Plane's SMTP email integration (God Mode → Email settings) only supports basic SMTP authentication (host/port/username/password). Microsoft 365 tenants increasingly disable legacy/basic SMTP AUTH by default (Security Defaults / Conditional Access), which means self-hosted Plane instances using an Outlook/Microsoft 365 mailbox for outbound mail cannot authenticate at all — they hit 535 5.7.139 Authentication unsuccessful regardless of a correct password, and there is no way to send email through such a tenant today.
Proposal
Add Microsoft Graph API (/users/{mailbox}/sendMail) as an alternative email provider, authenticated via OAuth2 client-credentials (Azure AD app registration with Mail.Send application permission). This lets Plane send mail through Microsoft 365 mailboxes even when basic SMTP auth is disabled tenant-wide, without requiring any change to Plane's existing SMTP setup for everyone else.
Proposed approach:
- New
InstanceConfigurationkeys:EMAIL_PROVIDER(SMTPdefault, orMICROSOFT_GRAPH),EMAIL_GRAPH_TENANT_ID,EMAIL_GRAPH_CLIENT_ID,EMAIL_GRAPH_CLIENT_SECRET(encrypted) — same pattern as the existing SMTP keys, editable via the instance configuration API. - A single
EMAIL_BACKEND(PlaneEmailBackend) that transparently delegates to Django's existing SMTP backend unlessEMAIL_PROVIDERisMICROSOFT_GRAPH, in which case it sends via Microsoft Graph'ssendMailendpoint using a client-credentials token. This means every existing call site (magic link, invites, notifications, etc.) keeps working unchanged — nothing behaves differently unless an instance opts in. - No new required dependency (
requestsis already a dependency).
I have a working implementation (backend module, Graph API client, and unit tests) and would like to submit it as a PR referencing this issue, per the contributing guide. Not proposing any admin UI changes in this first pass — configuration would be via the existing instance-configuration API/DB rows, same as SMTP is today. Happy to adjust scope based on maintainer feedback.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing Plane's existing SMTP configuration through the instance-configuration API/DB rows and Django's email backend. Review the proposed backend module, Graph API client, and unit tests, then verify that SMTP remains the default, Microsoft Graph uses client-credentials configuration, and existing email call sites continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, django, python
- Domain
- api, authentication, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100