Microsoft Teams Channel
@omadia/channel-teams
Microsoft Teams als First-Class-Channel 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.27.0
- license
- MIT
- versions
- 28
- author
- byte5 GmbH
install
In your omadia instance, open Admin → Registries and add this registry, then install Microsoft Teams Channel from Admin → Plugins → Store.
https://hub.omadia.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.
Multiple bots (optional)
One plugin install can run several Teams bots — one Entra app registration / Azure bot per omadia agent. Configure them as a JSON array in Teams 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. 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).
versions
setup fields
Values the operator fills in at install-time.
permissions
events
emit: true
memory
reads: [0] · writes: [0]
graph
reads: [0] · writes: [0]
network
outbound: [2]
filesystem
scratch: false