Skip to content

Add a Microsoft Teams template generated from Microsoft Graph's OpenAPI description - #340

Merged
tnkuehne merged 2 commits into
feat/excel-templatefrom
feat/teams-template
Nov 23, 2026
Merged

tnkuehne merged 2 commits into
feat/excel-templatefrom
feat/teams-template

Conversation

@tnkuehne

@tnkuehne tnkuehne commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Change

A Microsoft Teams template.

  • 20 typed methods for the signed-in user:
    • chats, their members and messages
    • new one-on-one and group chats, and quoted replies
    • joined teams, channels, and channel messages and replies
  • Sending messages and starting chats reach other people. They are send changes and ask by default.
  • It uses the shared Microsoft account connection.
  • Scopes: Chat.ReadWrite, ChatMessage.Send, Team.ReadBasic.All, Channel.ReadBasic.All, ChannelMessage.Read.All and ChannelMessage.Send.
    • Managed Microsoft clients must allow these scopes.
    • ChannelMessage.Read.All needs consent from a tenant administrator, which template.md describes.

Generator rule bindings. A body can bind named navigation properties to existing entities by address, as <property>@odata.bind. createChat binds each member's user this way.

This builds on the Excel template PR, whose header rule the shared REST runtime uses.

Tests

  • Template tests: connection, reads, sending with approval, chat creation and type checks.
  • Generator test for bindings.
  • Teams is included in the managed OAuth tests, and the fixture allows its scopes.
  • Ran pnpm check, the generator tests and the template tests.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; both previous findings are fixed, and no new actionable issue was established.

Summary

Adds a Microsoft Teams template with 20 typed Microsoft Graph methods.

  • Teams users can read chats and channels and send messages.
  • The OpenAPI generator can bind named properties to existing entities by address.

Tests were inspected but not run.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Call a Teams method] --> B[Check request arguments]
  B --> C[Check the user's Microsoft connection]
  C --> D{Write needs approval?}
  D -->|Yes, no answer yet| E[Return a question]
  D -->|Declined| F[Return declined]
  D -->|Approved or not required| G[Call Microsoft Graph]
  G --> H[Return data or an error]
Loading

Reviews (2) · Last reviewed commit: "Type chat members with their user identi..." · Reviewed by Greptile

@tnkuehne
tnkuehne added this pull request to stack #341 November 23, 2026 14:17
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
widefleet-docs c0eddfa Nov 23 2026, 02:34 PM

Comment thread templates/teams/src/api.ts Resolved
Comment thread templates/teams/template.md Resolved
…PI description

The template offers 20 typed methods for the signed-in user's Teams: chats,
their members and messages, new one-on-one and group chats, quoted replies,
joined teams, channels, and channel messages and replies. Sending messages and
starting chats reach other people, so they are send changes and ask by
default. It uses the shared Microsoft account connection and the official
Teams icon.

Scopes: Chat.ReadWrite, ChatMessage.Send, Team.ReadBasic.All,
Channel.ReadBasic.All, ChannelMessage.Read.All and ChannelMessage.Send.
ChannelMessage.Read.All needs a tenant administrator's consent, which
template.md describes. Managed Microsoft clients must allow these scopes.

The OpenAPI generator gains a bindings rule: a body can bind named navigation
properties to existing entities by address, as <property>@odata.bind.
createChat binds each member's user this way.
…ember addresses

listChatMembers now answers with aadUserConversationMember items, as a
chat's members do, so callers read userId, email and tenantId without casts.
The createChat examples double apostrophes in user names and encode the rest
before binding them as users('...'), so user principal names with apostrophes
or # stay valid addresses.
@tnkuehne
tnkuehne force-pushed the feat/teams-template branch from 5267575 to c0eddfa Compare November 23, 2026 14:33
@tnkuehne
tnkuehne merged commit 96ddc39 into main Nov 23, 2026
16 checks passed
@tnkuehne
tnkuehne deleted the feat/teams-template branch November 23, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant