Skip to content

research: Microsoft Teams personal notifications (approvals, AI pending actions) — work items and effort, read against main #35668

Open

Description

@objectstack-fleet

repo:objectstack#4 · os-elon-musk · session_016WV4cxgb3PKFkt8y5FigJn

Research card requested by the maintainer (one card, no sub-cards); drafted by an independent fable-model review against main. Edition split and build go-ahead are the maintainer's decision.

Research card, not a build order. Read on objectstack-ai/objectstack main at d96c878e (2026-11-19), the ADR-0013 addendum on branch claude/area-a4W-34730 (head 73a678ad, which follows 509987bf), and the Slack card #34730 with its rulings 7023437637, 7023709522, 7023586880. Effort is in engineer-days for one engineer who knows this repo, tests and repo gates included, review wait excluded. The enterprise rows are rougher than the open rows: the cloud repository was not read for this card.

Goal

A person receives platform notifications (approval requests, reminders and outcomes, and AI actions waiting for their confirmation) as a personal chat message from an ObjectStack bot in Microsoft Teams, with a link back to the record, under the same rules the Slack design already has: the organization installs once, each person is bound by an email match that they confirm once, delivery is one-to-one only (no team channels), and preferences, digest and quiet hours are obeyed. A second phase lets the person approve or reject from the card itself.

What exists today

Reused as is:

What Where Use for Teams
The channel seam: send, classifyError, isAvailable packages/services/service-messaging/src/channel.ts a teams channel implements it
Lazy channel mount (channel exists while its transport service resolves) packages/services/service-messaging/src/messaging-service-plugin.ts (email, sms, push at lines 542, 561, 580) same pattern for teams
Closest precedent: push channel plus per-person address registry, with dead-address retirement push-channel.ts (340 lines), device-registry.ts (307), objects/user-device.object.ts (180) in the same package a Teams conversation reference is the same kind of thing as a device token
Outbox, retry classes, preferences, quiet hours, digest dispatcher.ts, backoff.ts, preference-resolver.ts, digest-render.ts unchanged
teams is already a declared channel name packages/spec/src/system/notification.zod.ts (NotificationChannelSchema) no spec enum change
Known-channel list with configured: false for an unmounted channel messaging-service.ts (getKnownChannels), preference-options.ts, my-preferences-routes.ts the settings page can list Teams before it is set up
Approval notifications: 11 topics, all through messaging.emit packages/plugins/plugin-approvals/src/approval-service.ts (emit near line 2478; topics approval.requested, .reminder, .approved, .rejected, .returned, .reassigned, .request_info, .comment, .escalated, .sla_breached, .ooo_*) the producers do not change per channel
Session-less decision lane with single-use tokens, and a raw HTTP route mounted by a plugin plugin-approvals/src/approvals-plugin.ts (rawApp.get(ACT_PATH)), action-link-pages.ts, ADR-0043 the model for phase 2, and the precedent for mounting the bot endpoint
Absolute link base plugin-approvals/src/public-base-url.ts card buttons need absolute URLs
OAuth2 client_credentials grant with per-dispatch refresh, connection record, encrypted credential object, credential entry UI descriptors (ADR-0143, open tier) packages/spec/src/shared/connector-auth.zod.ts, packages/services/service-automation/src/oauth2-grant/*, sys-connector-connection.object.ts, sys-connector-credential.object.ts, connector-credentials-ui.ts the Bot Framework token is exactly this grant (app id and secret against the Entra token endpoint, scope https://api.botframework.com/.default), so no new credential store is needed for the self-hosted case
JWT verification library jose, already a dependency of packages/plugins/plugin-auth validating inbound bot activities
Shape of a vendor connector package packages/connectors/connector-slack (213 + 107 lines, static bearer token) template for connector-teams

Missing (measured, not assumed):

  • sys_channel_account: 0 hits in code. ADR-0012 reserves it; it was never built.
  • sys_channel_user_link: 0 hits in code.
  • No slack or teams channel is registered; no Teams code of any kind exists (the only teams hit in messaging is the enum value).
  • No inbound, vendor-verified message endpoint exists in the open repo. plugin-webhooks is outbound only; ADR-0013's receiver is still Draft, and the accepted addendum puts inbound out of scope.
  • A chat channel is never selected today: emit defaults to ['inbox'] and approvals pass ['inbox', 'email'] explicitly (approval-email-templates.ts, APPROVAL_EMAIL_CHANNELS). Something must make a person's linked chat channel eligible without every producer naming it.
  • rate_limited is a declared error class (channel.ts) but only the sms channel returns it, and nothing reads a vendor's retry-after value.
  • No notification topic exists for AI pending actions: PLATFORM_NOTIFICATION_TOPICS in preference-options.ts has none, and IAIService.proposePendingAction is a contract in packages/spec/src/contracts/ai-service.ts with no implementation in this repo. Whether the implementation emits through messaging.emit has to be checked where it lives.
  • The personal settings page (account:notification_settings, named in packages/platform-objects/src/apps/account.app.ts) is a console page outside this repo.

Shared with the Slack card #34730 — lands once for both

These are not Teams work if #34730 lands first. They are counted once, in their own table, and not in the Teams rows.

# Shared item Package / files Effort (days)
S1 sys_channel_account (one org install row) and sys_channel_user_link (person link with proposed and confirmed states): objects, registration, organization scoping, translations service-messaging/src/objects/ 4–6
S2 Propose-then-confirm binding service and the person-scoped routes (propose, confirm, disconnect), route ledger entries service-messaging/src/ 3–5
S3 Chat-channel eligibility in fan-out (a confirmed link plus the person's preference adds the channel), and the record of why a person was skipped messaging-service.ts, preference-resolver.ts 2–4
S4 Connect and disconnect on the personal notification settings page console page account:notification_settings (objectui) 2–3
S5 Retry-after aware handling of rate_limited in the outbox dispatcher.ts, backoff.ts 1–2
S6 A topic for AI pending actions, emitted through messaging.emit AI service implementation (outside this repo) plus preference-options.ts 1–2
Shared total 13–22

Condition for the saving: S1 and S2 must be built vendor-neutral (a channel_id column, an opaque external user id, a JSON address payload), not Slack-shaped. That is a review point for the #34730 pull requests, and it costs #34730 about one extra day.

Teams work items

Phase 1 is parity with the Slack ruling: a personal card with a link. Phase 2 is the in-card decision.

# Item Package / files Tier Effort (days) Depends on
T0 ADR-0013 addendum for Teams: install model, binding by confirmed email match with the Entra object id as the stored key, personal scope only, the inbound endpoint as an accepted exception docs/adr/0013-bidirectional-messaging.md open 1–1.5 maintainer ruling
T1 App registration kit: Teams app manifest template (bot, personal scope only), icons, a packager that writes the org's Microsoft App ID into the zip, written steps for the Entra app and Azure Bot resource (single-tenant) new packages/connectors/connector-teams/manifest/, docs open 2–3 T0
T2 connector-teams: Bot Connector REST client (create one-to-one conversation, send activity, update activity, read conversation member), token through the ADR-0143 client_credentials grant, error mapping, plugin registration. No dependency on the Bot Framework SDK (see risks) new packages/connectors/connector-teams/src/ open 3–5 none
T3 Bot messaging endpoint: one raw POST route; validates the bearer JWT on every activity (Bot Framework OpenID metadata, key cache, issuer, audience equal to the org's app id, service URL claim, tenant equal to the org's install); handles install and uninstall events; answers within the vendor's time limit service-messaging/src/ (new teams-activity-routes.ts), route ledger open 4–6 S1, T2
T4 Conversation reference and person binding for Teams: store Entra object id, tenant id, conversation id and service URL on the link; propose by reading the installer's email from the conversation member; confirm once (card in Teams or the settings page); uninstall or block retires the link service-messaging/src/ open 3–4 S1, S2, T3
T5 teams channel: resolve the confirmed link, send through the connector, isAvailable from the org install, error classes (not installed or blocked is invalid_recipient, throttled is rate_limited, bad credential is permanent), recipient locale service-messaging/src/teams-channel.ts, mount in messaging-service-plugin.ts open 3–4 S3, T2, T4
T6 Adaptive Card rendering: title, body (Markdown subset), facts, an open-in-ObjectStack button with an absolute URL, digest variant, size ceiling, button labels in the shipped locales, plain-text fallback service-messaging/src/teams-card.ts open 2–3 T5
T7 Admin setup: Setup page for the org install (app id, tenant id, secret; shows the endpoint URL to paste into Azure; manifest download; test message; status), and its server routes service-messaging/src/ routes, Setup nav in platform-objects, page in objectui open 3–5 S1, T1
T8 Teams row on the personal settings page (state, connect instructions, disconnect) objectui console page open 0.5–1 S4, T4
T9 Tests and docs: a fake Bot Connector server; integration tests (approval request reaches the linked person as a card with a link; muted or quiet hours sends nothing; unlinked person gets inbox and email only; uninstall retires the link; forged or wrong-tenant activity is refused); admin and user docs; platform checklist items; one manual pass against a real Microsoft 365 developer tenant service-messaging, connector-teams, docs/ open 5–8 T1–T8
T10 Phase 2 — approve and reject from the card: card action handler on the T3 endpoint, map the verified Entra user through the confirmed link to the platform user, re-check the request is pending and the slot is still theirs (the checks redeemActionToken makes), decide as that approver, replace the card with the outcome, idempotency, optional comment plugin-approvals/src/, service-messaging/src/ open 5–8 T3–T6, an ADR ruling (new decision lane beside ADR-0043)
T11 Phase 2 — confirm or reject an AI pending action from the card AI service implementation (outside this repo), card handler open 2–3 S6, T10
E1 Hosted one-click app: an ObjectOS-owned Entra app and Azure Bot, one hosted endpoint that routes each activity to the right environment and organization by tenant id, the install-to-organization flow, the Teams Store or org-catalog package cloud repo enterprise 8–14, plus Microsoft review time T1–T6
E2 Managed credentials and vault: bot secret or certificate behind the vault resolver, rotation before the Entra secret expires cloud repo enterprise 3–5 E1, the vault work of cloud ADR-0115
E3 Account health: scheduled credential probe, secret-expiry warning, link coverage and delivery failure rate per organization, degraded state shown in Setup cloud repo enterprise 3–5 E1
E4 Multi-tenant management (several Entra tenants per organization, or one tenant across several organizations): N install rows, routing, offboarding cloud repo enterprise 5–8 E1
E5 Admin consent and org-wide rollout: tenant admin consent link, pre-installing the app for all users through Microsoft Graph, bulk link status cloud repo enterprise 5–8 E1

Why T3 is in phase 1 although the Slack addendum keeps inbound out of scope: Slack can open a DM from a user id alone, but a Teams bot can only message a person after the app is installed for that person, and the install event delivered to the bot endpoint is the normal way to learn the conversation. There is an outbound-only alternative (the admin pre-installs the app for everyone; the platform looks the person up in Microsoft Graph by email and creates the conversation by Entra object id). It removes T3 from phase 1 (saves 4–6 days) but needs a Graph application permission with admin consent, and phase 2 needs the endpoint anyway. The card recommends the endpoint.

Totals

Part Days (low–high)
Open, phase 1 (T0–T9), Teams-specific 27–41
Open, phase 2 (T10–T11) 7–11
Open, all Teams-specific 34–52
Shared base (S1–S6), if Teams had to build it 13–22
Open, if Teams is built without #34730 47–74
Enterprise E1 hosted one-click app 8–14
Enterprise E2 managed credentials and vault 3–5
Enterprise E3 account health 3–5
Enterprise E4 multi-tenant management 5–8
Enterprise E5 admin consent and org-wide rollout 5–8
Enterprise, all 24–40
Overall, after #34730 58–92
Overall, without #34730 71–114

Saved when #34730's shared base lands first: 13–22 days, about a quarter of the open part. Recommended order: #34730 first, then Teams phase 1, then phase 2 for both chat apps together (Slack buttons need the same decision lane, so part of T10 would be shared again; not counted here).

Risks and unknowns

  1. Multi-tenant bot registration. Microsoft announced that new multi-tenant bots can no longer be created in Azure Bot Service after 2025-07-31. This decides the shape of E1 (one ObjectOS bot serving many customer tenants). Verify what a single-tenant bot identity may do when its Teams app is installed in other tenants. Self-hosted (T1) is not affected: a single-tenant registration is what it needs.
  2. SDK choice. The Bot Framework SDK repositories are at or near end of support, replaced by the Microsoft 365 Agents SDK. T2 and T3 are estimated on the plain REST protocol and JWT checks, with no SDK. Verify that the REST endpoints and the token validation rules are still the documented ones.
  3. Install is per person. A person receives nothing until the app is installed for them: by themselves, by a Teams admin setup policy, or through Graph (E5). On community deployments the rollout is manual; say so in the docs.
  4. Org admin approval. Self-hosted: the org's Teams admin must allow custom app upload, or add the zip to the org catalog. Hosted: Teams Store submission goes through Microsoft validation (calendar time unknown, plan in weeks; needs privacy and terms URLs and a verified publisher), or each customer admin uploads the zip to their catalog.
  5. Public endpoint. T3 must be reachable from Microsoft over HTTPS. A self-hosted deployment behind a firewall cannot use it; the outbound-only alternative above is the fallback for those.
  6. Rate limits. Teams throttles per conversation (about one message a second, with burst and hourly ceilings) and per app per tenant. Verify the current numbers; a digest or an escalation burst to one person is the case that hits them. S5 is the mitigation.
  7. Email match quality. The member lookup returns email and user principal name, which differ in some tenants; guests have external addresses. An ambiguous or absent match proposes nothing (ADR-0013 risk 4). If the deployment signs in with Microsoft, an exact match on the Entra object id may be possible: verify what sys_account.account_id holds for the Microsoft provider (the per-app subject or the object id).
  8. Phase 2 is a new authorization lane. A decision made from a card has no platform session; identity rests on the verified activity plus the confirmed link. It needs its own ruling beside ADR-0043 (replay, card forwarded or seen by a delegate, reassignment after the card was sent, field-level security on what the card shows — action-link-pages.ts shows the record id and not its title for that reason).
  9. Sovereign clouds (GCC, GCC High, 21Vianet) use different endpoints. Not estimated.
  10. AI pending actions. The producer is outside this repo; S6 and T11 are the least certain rows.
  11. Test access. A Microsoft 365 developer tenant is needed for the manual pass in T9; CI uses the fake server only.

Edition (background)

A business review of where Teams sits is in /mnt/project-files/area-ai-seat/decisions/teams-edition-fable.md (options A split, B all enterprise, C all free, D defer). This card assumes option A, the split the maintainer already ruled for Slack in 7023709522: open keeps one install per organization with the org's own app, the person link and the confirm-once binding (T0–T11); enterprise keeps the hosted one-click app, managed credentials and vault, account health, and managed multi-tenant lifecycle (E1–E4), with admin consent and org-wide rollout (E5) on the enterprise side as the Teams counterpart of the hosted install. The one place Teams differs from Slack is phase 2: whether in-card approve and reject is open is not covered by the Slack ruling and should be asked with the ADR question in risk 8.

Activity

  1. added
    needs-user-decision
    area:workflow
    domain:server
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:workflowdomain:serverneeds-user-decision

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions