> ## Documentation Index
> Fetch the complete documentation index at: https://www.composer.id/llms.txt
> Use this file to discover all available pages before exploring further.

# Microsoft Teams

> Developer notes for the Teams upstream connector: Bot Framework, Adaptive Cards (v1.5 bot-sent, v1.2 mobile), Entra ID SSO and proactive messages.

These are developer notes for the Microsoft Teams upstream connector: how Triage's diagnostic runs as a bot in Teams, rendered with Adaptive Cards and authenticated with Microsoft Entra ID. The page documents the platform surface the Intake Gateway builds on. The gateway itself is described in [Upstream connectors](/connectors/overview).

<Info>
  The Teams connector is in beta and in active build. Every platform fact on this page is grounded in Microsoft's developer documentation, listed under Developer references.
</Info>

## Platform at a glance

<AccordionGroup>
  <Accordion title="Bot runtime" icon="server">
    An Azure Bot resource on the Bot Framework. The bot exposes a single HTTPS messaging endpoint that receives Bot Framework Activity objects.
  </Accordion>

  <Accordion title="App package" icon="package">
    A Teams app package (`manifest.json` plus colour and outline icons) declaring a bot in personal scope, published to the tenant's org catalog or side-loaded as a custom app. Distribution is governed by Teams admin policy.
  </Accordion>

  <Accordion title="Authentication" icon="key-round">
    Single sign-on with Microsoft Entra ID. The user is already signed in to Teams, and the bot obtains a token through an OAuth 2.0 on-behalf-of exchange, with no separate login.
  </Accordion>

  <Accordion title="Question rendering" icon="layers">
    Adaptive Cards. Teams supports Adaptive Card v1.5 or earlier for bot-sent cards; the Teams mobile app supports up to v1.2, so the gateway targets a mobile-safe subset. The reference renderer emits schema version 1.4.
  </Accordion>

  <Accordion title="Inputs and submit" icon="list">
    `Input.ChoiceSet` for the answer options, `Action.Submit` to post the answer back to the bot, and `Action.OpenUrl` for the deep link on the completion card.
  </Accordion>

  <Accordion title="Lock in place" icon="lock">
    The bot edits the message it sent (an update activity), replacing the question card with a locked card that has no input elements. The "answers lock, no back button" property is enforced structurally.
  </Accordion>

  <Accordion title="Back-sync" icon="arrow-right-left">
    Proactive messages let the bot post into the thread after the fact, using a stored conversation reference: the deep link once composerID's publish receipt lands, or an enrichment request.
  </Accordion>

  <Accordion title="Tenancy" icon="building-2">
    One admin consent per tenant authorises the app and its Entra permissions. Per-tenant diagnostic configuration lives in Triage, not in the app package.
  </Accordion>
</AccordionGroup>

## How the diagnostic runs in Teams

| Step | What happens on the platform                                                                                                                                         |
| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1    | The requester opens the Triage bot (personal scope). Teams delivers a Bot Framework message Activity to the gateway's HTTPS messaging endpoint.                      |
| 2    | The gateway performs the Entra ID SSO token exchange to obtain the requester's verified identity, silently, because they are already signed in to Teams.             |
| 3    | The gateway sends the first question as an Adaptive Card (`Input.ChoiceSet` plus `Action.Submit`).                                                                   |
| 4    | On submit, Teams posts the answer Activity. The gateway updates the same message to the locked card and sends the next question.                                     |
| 5    | On the final answer the gateway calls the Triage decision core. The Intent Record is minted and the completion card (channel, confidence, `intent://` chip) is sent. |
| 6    | When composerID publishes downstream, a proactive message updates the completion card with an `Action.OpenUrl` deep link to the created record.                      |

## Developer references

Microsoft's official Teams developer documentation. The facts on this page are grounded in these pages and in the vendor-published docs repository (`MicrosoftDocs/msteams-docs`).

| Reference                                | Vendor documentation                                                                                                                                        |
| ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Teams developer platform                 | [learn.microsoft.com: Teams developer platform](https://learn.microsoft.com/en-us/microsoftteams/platform/mstdd-landing)                                    |
| Bots: what are bots                      | [learn.microsoft.com: What are bots](https://learn.microsoft.com/en-us/microsoftteams/platform/bots/what-are-bots)                                          |
| Cards reference (Adaptive Card versions) | [learn.microsoft.com: Cards reference](https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-reference)              |
| SSO with Microsoft Entra ID              | [learn.microsoft.com: Bot SSO overview](https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/authentication/bot-sso-overview)              |
| Send proactive messages                  | [learn.microsoft.com: Send proactive messages](https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/conversations/send-proactive-messages) |
| App manifest schema                      | [learn.microsoft.com: App manifest schema](https://learn.microsoft.com/en-us/microsoftteams/platform/resources/schema/manifest-schema)                      |
| Adaptive Cards                           | [adaptivecards.io](https://adaptivecards.io/)                                                                                                               |

<Note>
  The Teams renderer and its contract tests live in `upstream/teams_cards.py`. [Upstream connectors](/connectors/overview) explains how to run the reference implementation.
</Note>

## Next steps

<Columns cols={2}>
  <Card title="Upstream connectors" icon="messages-square" href="/connectors/overview">
    The Intake Gateway, the card lifecycle and the hand-off to composerID.
  </Card>

  <Card title="Coverage and status" icon="table" href="/destinations/index">
    Every surface and destination with its registry status.
  </Card>
</Columns>
