Add it when you need it

Microsoft 365

Microsoft 365 as a provider for the connectors plugin, which it requires — install connectors first. One multi-tenant Entra app for your whole deployment; each customer’s admin consents to it once.

Installing it

Install connectors first.

zsh — your app
pnpm plugin add https://github.com/rocketflare-dev/rocketflare-plugins.git@3.14.0 --subdir plugins/m365pnpm plugin add https://github.com/rocketflare-dev/rocketflare-plugins.git@3.14.0 --subdir plugins/m365 --apply
The first prints the plan and stops; the second writes it.

It has no tables, so there is no migration. Then do the handful of steps the plan lists that a plugin may not do for you.

What it adds

  • Admin consent, once — a customer’s admin clicks Connect, consents in Microsoft’s own screen, and is sent back. No app registration on their side, no secret to paste.
  • App-only access — a client-credentials token per organisation, cached encrypted, with read-only permissions for users, groups and calendars.
  • Graph delta queries — users, groups with their memberships, and each member’s calendar over a rolling window from 30 days back to 90 ahead. A throttled call waits as long as Microsoft asks; an expired change token starts a full pass.
  • Two secrets — M365_CLIENT_ID and M365_CLIENT_SECRET, your Entra app. An organisation can bring its own app instead.

Releases

  1. 3.14.0 2026-11-22

    No change to m365: this release carries the analytics, freeagent, guide, inbox and web-knowledge changes, and every plugin in this repository ships at one version. Porting note.

  2. 3.13.3 2026-11-22

    No change to m365: this release carries the global-search and connectors test changes, and every plugin in this repository ships at one version. Porting note.

  3. 3.13.2 2026-11-21

    The m365 manifest now carries a one-line description, which the kit's pnpm plugin list --available prints in place of the README's opening line. Porting note.

  4. 3.13.1 2026-11-21

    No change to m365: this release exists because the repository released analytics and every plugin here ships at the repository's version. Porting note.

  5. 3.13.0 2026-11-20

    No change to m365: this release exists because the repository released analytics and every plugin here ships at the repository's version. Porting note.

13 older releases
  1. 3.9.0 2026-11-09

    Microsoft 365 consent now completes only on a verified sign-in by an administrator of the claimed tenant. Porting note.

  2. 3.8.2 2026-11-08

    No change to m365. This release exists because freeagent typechecks on kit 0.25.0 and later again, and every plugin here ships at the repository's version. Porting note.

  3. 3.8.1 2026-11-03

    No change to m365. This release exists because analytics scopes GET /api/analytics/facts/status to the caller's organisation, and every plugin here ships at the repository's version. Porting note.

  4. 3.8.0 2026-11-03

    No change to m365. This release exists because analytics moves to drizzle-cube 0.12.2 and compiles on React 19 with React Router 7, and every plugin here ships at the repository's version. Porting note.

  5. 3.7.0 2026-10-24

    No change to m365. This release exists because inbox splits forwarded-as-attachment email into messages of their own, and every plugin here ships at the repository's version. Porting note.

  6. 3.6.0 2026-10-24

    No change to m365: this release exists because inbox and freeagent ship for the first time, and every plugin here ships at the repository's version. Porting note.

  7. 3.5.1 2026-10-22

    No change to m365: this release exists because analytics raised its minKit to 0.17.1, and every plugin here ships at the repository's version. Porting note.

  8. 3.5.0 2026-10-22

    No change to m365: this release exists because issue-reports ships for the first time, and every plugin here ships at the repository's version. Porting note.

  9. 3.4.2 2026-09-30

    No change to m365: this release exists because analytics fixed a test that failed the kit's tenant-isolation scan, and every plugin here ships at the repository's version. Porting note.

  10. 3.4.1 2026-09-27

    No change to m365: this release exists because analytics needed a type fix to compile against kit 0.15.0's driver-neutral Database, and every plugin here ships at the repository's version. Porting note.

  11. 3.4.0 2026-09-27

    No change to m365: this release exists because analytics was made to work with both database drivers the kit may run, and every plugin here ships at the repository's version. Porting note.

  12. 3.3.0 2026-09-27

    No change to m365: this release exists because the repository added skills to connectors and analytics, and every plugin here ships at the repository's version. Porting note.

  13. 3.2.0 2026-09-26

    The first release: Microsoft 365 as a connectors provider (D34, phase 1). An organisation admin grants the deployment's multi-tenant Entra app admin consent once; the directory (users/delta, groups/delta with memberships) and the Outlook calendars of people who are members of this app (calendarView/delta over a rolling −30…+90 day window) then sync every 15 minutes, app-only. Porting note.

From the README

Synced from the plugin's README — the plugin's own documentation, kept in step with its repository.

This plugin is the vendor half of a connection. It has no tables, routes or pages of its own — everything you see belongs to connectors, which it requires.

What it adds

AreaWhat you get
ConsentEntra admin consent through /organizations/v2.0/adminconsent, then one OpenID Connect sign-in at that tenant: the connection goes active on a verified id_token naming the organisation and an administrator. One organisation can back one workspace
TokensClient-credentials tokens per organisation, cached sealed and re-minted before expiry; a bearer token is only ever sent to graph.microsoft.com
Directoryusers/delta and groups/delta with memberships
CalendarscalendarView/delta per member mailbox, over a rolling window from 30 days back to 90 days ahead
ResilienceHonours Retry-After on 429/503/504, sends x-ms-throttle-priority: low, restarts a full pass on 410 / syncStateNotFound, and marks the installation in error when consent is revoked or the secret expires

Requirements

  • Rocketflare kit 0.29.0 or later, and the connectors plugin (kit 0.29.0).
  • An app registered in Microsoft Entra ID as multitenant, with the web redirect URI <APP_URL>/api/hooks/connectors/m365/callback for each environment and three Microsoft Graph application permissions: User.Read.All, Group.Read.All, Calendars.Read.
  • Secrets M365_CLIENT_ID and M365_CLIENT_SECRET (optional: without them, an organisation can still bring its own app from Settings → Connections).

Install

After connectors:

pnpm plugin add https://github.com/rocketflare-dev/rocketflare-plugins.git@3.14.0 --subdir plugins/m365 --apply

Set it up

With your coding agent (recommended): ask it to set up Microsoft 365 connections. The connectors skill checks your config, drives the Azure CLI to register the app and add the permissions, writes the client secret to .dev.vars or your deployed secrets without printing it, and reminds you when the secret expires (24 months at most).

By hand, in the Entra admin center:

  1. App registrations → New registration → Accounts in any organizational directory (multitenant).
  2. Authentication → add a Web redirect URI: <APP_URL>/api/hooks/connectors/m365/callback (locally http://localhost:3000/api/hooks/connectors/m365/callback).
  3. API permissions → Microsoft Graph → Application permissions → User.Read.All, Group.Read.All, Calendars.Read.
  4. Token configuration → Add groups claim → Directory roles (ID token), so a consenting administrator can be recognised.
  5. Certificates & secrets → New client secret; copy the value (shown once).
  6. Set M365_CLIENT_ID and M365_CLIENT_SECRET — apps/web/.dev.vars locally, pnpm provision secrets <env> when deployed.
  7. Before offering it to other organisations, complete publisher verification (Branding & properties) — unverified multitenant apps show a warning at consent.

Then an admin of each customer organisation presses Connect Microsoft 365 in Settings → Connections and a Global Administrator (or Privileged Role Administrator) consents, then signs in once more so the app can confirm the organisation.

Troubleshooting

Consent and token errors arrive as AADSTS codes — for example 50011 (redirect URI mismatch), 65001 (consent not granted), 7000215 (wrong secret) and 7000222 (expired secret). The connectors skill has the full table and the fix for each; ask your agent to troubleshoot the connection. To disconnect completely, press Disconnect in Settings → Connections and remove the app under Entra admin center → Enterprise applications.

Known gaps

  • Client secret only; certificate credentials are not supported yet.
  • No webhooks, mail or files yet (see connectors’ roadmap).
  • Mailbox scoping with Exchange RBAC for Applications is possible on Microsoft’s side but untested with this plugin.

More