Skip to main content

Microsoft Teams (Graph)

Send feature flag change notifications to a Teams channel using Microsoft Graph. App-only delivery is recommended where available.

Prerequisites

  • An Azure AD app registration with client credentials.
  • Graph permissions (Application) where supported:
    • ChannelMessage.Send (app)
    • Team.ReadBasic.All (app)
  • If your tenant/cloud does not expose ChannelMessage.Send (e.g., some sovereign clouds), app-only channel send is unavailable; use delegated send or the legacy webhook connector instead.
  • Tenant ID, Client ID, and Client Secret configured in Toggly (Graph:TenantId, Graph:ClientId, Graph:ClientSecret).
  • A channel link from Teams (right-click the channel → “Get link to channel”).

Setup in Toggly

  1. Go to Integrations → Add Integration → Microsoft Teams.
  2. Pick the Toggly environment the notifications should represent.
  3. Paste the channel link from Teams (we parse teamId/channelId).
  4. Choose which events to send (created, status changed, rollout updated, deleted).
  5. Save and use Test to send a sample flag change.

Message format

We send an Adaptive Card (v1.4) with:

  • Flag name/key and environment
  • Change summary and before/after values
  • Actor when available

Batch sends collapse multiple flag changes into a single card.

Metrics

Per-environment metrics recorded:

  • Teams Notifications Sent
  • Teams Notification Errors
  • Teams Notification Latency

Tips

  • Use a dedicated app registration scoped only to the needed permissions.
  • If the channel link changes, update it in Toggly so we send to the right channel.
  • Adaptive Card payloads stay under Teams limits (~4 KB recommended).
  • If ChannelMessage.Send (Application) is not available in your tenant, switch to a delegated-flow app with ChannelMessage.Send (delegated) or fall back to the Teams webhook connector (if allowed in your org).