Microsoft Teams Channel

@idaria/channel-teamschannel.teams

Microsoft Teams als Kanal für idaria. Bot-Framework-Adapter, Adaptive-Card-Rendering, Roster + Mention-Resolution, Attachment-Persistenz mit HMAC-signiertem Proxy. Konsumiert den geteilten Graph-Client aus @idaria/integration-microsoft365 für Attachment-Downloads + Roster-Lookups.

channel · communication

Setup guide

Connect Microsoft Teams

Teams runs as an Azure Bot that reuses the same Azure AD app as the Microsoft 365 integration. Install @idaria/integration-microsoft365 first — it owns the app credentials (client id / secret / tenant); this channel only adds Teams-specific knobs.

1. Register the Azure Bot

  1. Azure Portal → create an Azure Bot resource.
  2. Use the existing app registration from the Microsoft 365 integration (same Microsoft App ID).
  3. Configuration → Messaging endpoint: <your-public-base-url>/api/teams/messages.
  4. Channels → enable Microsoft Teams.

Several channel identities (optional)

One plugin install can run several Teams bots. Each bot is the channel identity of one idaria agent (one Entra app registration / Azure bot per agent). Configure them as a JSON array in Teams channel identities (bots, JSON):

[{"botSlug": "default", "appId": "<entra-app-id>",
  "tenantId": "<entra-tenant-id>",
  "appPasswordSecretRef": "microsoft_app_password",
  "appType": "SingleTenant", "displayName": "idaria"}]
  • appPasswordSecretRef names the vault secret holding that bot's app password — never put the password itself into config.
  • appType defaults to SingleTenant (Azure deprecated creating MultiTenant registrations 07/2025); legacy bots may set MultiTenant.
  • Each bot's Azure messaging endpoint is <your-public-base-url>/api/teams/<botSlug>/messages. The first entry is the default bot — it also serves the legacy /api/teams/messages and /api/messages endpoints, so existing Azure bot registrations keep working.
  • Leave the field empty to keep the classic single-bot setup: the Microsoft 365 integration's app credentials are used as bot default (app type from MICROSOFT_APP_TYPE, default MultiTenant).

2. Upload the Teams app

Upload the Teams app package (manifest.json + icons as a ZIP) in Teams under Apps → Manage your apps → Upload a custom app.

3. Optional knobs

  • OAuth Connection Name: if you add a v4 OAuth connection in the Azure Bot Service, put its name here to enable calendar SSO (OBO flow). Empty → calendar tools report sso_unavailable.
  • Notify Team ID: the AAD groupId of the team where bell notifications appear — get it via Teams → Team settings → Get link to team (groupId query param) or Graph Explorer (/teams). Empty → log-only.
  • Attachment prefix, topic URL and directory label have safe defaults.

4. Answer cards (nothing to configure)

An answer card is the answer text plus, where the kernel's AI disclosure setting asks for it, a discreet "✨ AI-generated" chip. A consulted colleague answers in a message of its own, through its own bot, and is consulted only where that bot is in the chat; a management-layer notice appears under the heading "System". Verification, data provenance, privacy counters and memory use sit in ONE collapsed "Details" element. Buttons appear only for next steps the agent itself proposed, for decisions it asks for, and for sign-in or poll cards. What an operator used to switch with the teams_card_* fields is no longer a switch: those buttons do not exist any more. Old teams_card_* values in a saved configuration are ignored.

5. An agent's team comes along

When one of the bots is added to a team or a chat, the channel tells the kernel which bot it was and, in a team, which team. A kernel with agent teams then installs the Teams apps of that agent's team members into the same team or chat, for members available to the person who added the bot. The kernel does this with its own Teams provisioning; this channel installs nothing and needs no permission of its own for it. The kernel's provisioning needs TeamsAppInstallation.ReadWriteForTeam.All (for a chat the ForChat equivalent) on the Microsoft 365 integration's app registration.

6. Teams tabs (Hub + Tab-Config)

Teams loads /p/channel-teams/hub and /tab-config without an idaria session. Two things make them work:

  1. Grant the public path /p/channel-teams for this plugin in the operator UI (Plugins → Microsoft Teams Channel → Grants). The pages are data-free; the plugin catalogue (/p/channel-teams/catalog) is only served to a Teams SSO token the idaria kernel verified (requires idaria core with plugin-api >= 1.51.0).
  2. Teams SSO on the app registration (once): Expose an API → Application ID URI api://<middleware-host>/<app-id>, scope access_as_user (admins and users), and authorise the Teams clients 1fec8e78-bce4-4aaf-ab1b-5451cc387264 (desktop/mobile) and 5e3ce6c0-2b1f-4285-8d4b-75ee78787346 (web) for that scope. The app package's webApplicationInfo already points there.

Setup fields

The operator fills these in when installing the plugin.

  • teams_botsstring, optional
    Teams-Kanalidentitäten (Bots, JSON)Optionale Multi-Bot-Konfiguration (#860): JSON-Array von Kanalidentitäten (ein Bot je Agent) [{botSlug, appId, tenantId, appPasswordSecretRef, appType?, displayName?}]. appPasswordSecretRef referenziert das Vault-Secret mit dem App-Passwort des Bots (niemals das Passwort inline). appType: MultiTenant | SingleTenant | UserAssignedMSI, Default SingleTenant. Eintrag 0 ist der Default-Bot (bedient auch /api/messages + /api/teams/messages); jeder Bot empfängt unter /api/teams/<botSlug>/messages. Leer lassen → Single-Bot-Betrieb über die Credentials der Microsoft-365-Integration (microsoft_app_id / microsoft_tenant_id / microsoft_app_password, App-Typ aus MICROSOFT_APP_TYPE, Default MultiTenant).
  • teams_sso_connection_namestring, optional
    Bot Framework OAuth Connection NameName der im Azure Bot Service konfigurierten OAuth-Connection (v4). Wenn gesetzt, versucht der Bot pro Turn ein UserTokenClient.getUserToken() — das resultierende JWT wird als ssoAssertion an die Kalender-Tools weitergereicht (OBO-Flow für delegierte Graph-Scopes). Leer lassen → Kalender-Tools surface 'sso_unavailable'.
  • teams_attachment_key_prefixstring, optional
    Tigris-Key-Präfix für AttachmentsNamespace-Präfix für persistierte Teams-Attachments im gemeinsamen Tigris-Bucket. Erlaubt Co-Existenz mit den Diagram-Renderings (`diagrams/`). Default 'teams-attachments'.
  • teams_notify_team_idstring, optional
    Teams-Team-ID für Bell-NotificationsGroup-ID des Microsoft Teams Teams (AAD groupId), in dem plugin-emittierte Notifications als Activity-Feed-Bell erscheinen sollen. Holst du via Teams → Team-Settings → Get link to team → groupId-Query-Param ODER via Graph Explorer (/teams). Leer lassen → Fallback auf log-only.
  • teams_notify_topic_urlstring, optional
    Topic-URL für Activity-NotificationBrowser-Url die Teams öffnet, wenn der Nutzer auf die Bell-Notification klickt. Default: idaria-Hub. Plugin-spezifische Deep-Links überschreiben das pro Notification.
  • teams_directory_labelstring, optional
    Dashboard-Label für Channel-RoutingOptionales, für Administratoren lesbares Label für /operator/channels (statt 'Teams · <bot-app-id-short>'). Beispiel: 'Teams · Production · Marketing'. Leer lassen → generiertes Default-Label.
Show all 7 setup fields
  • teams_native_ai_labelboolean, optional
    AI marking: rely on the Teams labelOff (default): messages an agent posts on its own (moderation posts, reminders, routine deliveries, very long answers) carry the instance's AI disclosure sentence. Switch on only after you have SEEN the label "AI Generated" next to the agent's name on such a message in your Teams client; the sentence is then left out. Answer cards show their own "✨ AI-generated" chip whenever the kernel's AI disclosure setting asks for a visible marker.

Permissions

This is everything the plugin is allowed to access once it is installed.

sql
migrationsmigrations
ledgerplg_idaria_channel_teams_migrations
events
emityes
memory
readsnone
writesnone
graph
readsnone
writesnone
network
outboundsmba.trafficmanager.net*.botframework.comlogin.microsoftonline.comgraph.microsoft.com*.sharepoint.com
filesystem
scratchno
public_paths
allowed/p/channel-teams

Dependencies and capabilities

Requires
chatAgent@^1

Versions

VersionCoreSizePublishedsha256Download
v0.55.0latest>=1.115.0 <2.0482.2 KB4 Dec 20269ad4ad309c21….zip
v0.54.1>=1.115.0 <2.0480.6 KB4 Dec 2026ddaa66b961be….zip
v0.54.0>=1.115.0 <2.0479.2 KB4 Dec 2026775ce411d056….zip
v0.52.1>=1.115.0 <2.0511.3 KB4 Dec 20268c80e67f4a8c….zip
v0.52.0>=1.115.0 <2.0509.9 KB4 Dec 2026fbd5da809e35….zip
v0.51.1>=1.82.0 <2.0509.4 KB3 Dec 2026fb3803bbb6c1….zip
v0.51.0>=1.82.0 <2.0500.5 KB3 Dec 2026da3a2196b1ee….zip
v0.50.0>=1.82.0 <2.0493.3 KB30 Nov 2026cff9a7966dd6….zip
v0.49.0>=1.82.0 <2.0494.4 KB30 Nov 20263cfb3b935d56….zip