Microsoft Teams Channel
@omadia/channel-teams
Microsoft Teams als Kanal für omadia. Bot-Framework-Adapter, Adaptive-Card-Rendering, Roster + Mention-Resolution, Attachment-Persistenz mit HMAC-signiertem Proxy. Konsumiert den geteilten Graph-Client aus `@omadia/integration-microsoft365` für Attachment-Downloads + Roster-Lookups.
- latest
- v0.48.0
- license
- MIT
- versions
- 58
- author
- byte5 GmbH
install
In your idaria instance, open Admin → Registries and add this registry, then install Microsoft Teams Channel from Admin → Plugins → Store.
https://hub.idaria.aisetup guide
Connect Microsoft Teams
Teams runs as an Azure Bot that reuses the same Azure AD app as the Microsoft 365 integration. Install @omadia/integration-microsoft365 first — it owns the app credentials (client id / secret / tenant); this channel only adds Teams-specific knobs.
1. Register the Azure Bot
- Azure Portal → create an Azure Bot resource.
- Use the existing app registration from the Microsoft 365 integration (same Microsoft App ID).
- Configuration → Messaging endpoint:
<your-public-base-url>/api/teams/messages. - Channels → enable Microsoft Teams.
Several channel identities (optional)
One plugin install can run several Teams bots. Each bot is the channel identity of one omadia 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": "Omadia"}]
appPasswordSecretRefnames the vault secret holding that bot's app password — never put the password itself into config.appTypedefaults toSingleTenant(Azure deprecated creating MultiTenant registrations 07/2025); legacy bots may setMultiTenant.- 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/messagesand/api/messagesendpoints, 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 fromMICROSOFT_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
colleague's contribution (consultation) appears attributed to that
agent; 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. Auto-invite agent apps (optional Graph consent)
With Agent Apps (JSON) (teams_agent_apps) configured, the channel
auto-installs the listed omadia agent apps into a team when one of its
bots is added there. That needs two extra Graph application
permissions on the shared app registration (admin consent required —
note that previously granted consent does not stretch to newly
added scopes: re-grant admin consent on the existing registration,
otherwise Graph keeps answering 403):
AppCatalog.ReadWrite.All— resolve the agent app in the tenant app catalog (/appCatalogs/teamsApps)TeamsAppInstallation.ReadWriteForTeam.All— install the catalog app into the target team (POST /teams/{team-id}/installedApps)
Grant them under API permissions → Add a permission → Microsoft
Graph → Application permissions, then Grant admin consent for
<Tenant> — or send an admin through the tenant-wide admin-consent
URL (public client id only, never a secret):
https://login.microsoftonline.com/<tenant-id>/adminconsent?client_id=<application-client-id>
Two field-tested gotchas: portal/CLI consent sometimes silently fails
to apply (command succeeds, Graph keeps answering 403) — then grant
the app roles directly via REST POST /servicePrincipals/{app-sp-object-id}/appRoleAssignments, one call
per missing permission. And acquired tokens are cached: restart the
middleware after granting consent, or the 403s persist even though
consent is in place. Without consent the feature degrades gracefully —
the bot posts a fallback card with per-agent install deep links
(https://teams.microsoft.com/l/app/<teamsAppId>, public app ids
only).
6. Teams tabs (Hub + Tab-Config)
Teams loads /p/channel-teams/hub and /tab-config without an omadia
session. Two things make them work:
- Grant the public path
/p/channel-teamsfor 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 omadia kernel verified (requires omadia core with plugin-api >= 1.51.0). - Teams SSO on the app registration (once): Expose an API →
Application ID URI
api://<middleware-host>/<app-id>, scopeaccess_as_user(admins and users), and authorise the Teams clients1fec8e78-bce4-4aaf-ab1b-5451cc387264(desktop/mobile) and5e3ce6c0-2b1f-4285-8d4b-75ee78787346(web) for that scope. The app package'swebApplicationInfoalready points there.
versions
setup fields
Values the operator fills in at install-time.
permissions
sql
migrations: migrations · ledger: plg_omadia_channel_teams_migrations
events
emit: true
memory
reads: [0] · writes: [0]
graph
reads: [0] · writes: [0]
network
outbound: [5]
filesystem
scratch: false
public_paths
0: /p/channel-teams