Skip to content

Microsoft Teams

Ed Mozley edited this page Oct 4, 2026 · 2 revisions

Microsoft Teams channel

Since 3.1.0 Β· Contributed by Andrew Turbay (@turbay-a) in PR #166 Β· How it works underneath: Teams and Mattermost β€” Developer Guide

People in your organisation chat to a service desk bot in Teams, one to one. Each conversation becomes a ticket, exactly like email, WhatsApp and Telegram, and analysts reply from the ticket's chat box.

FreeITSM talks to the Bot Framework only. It makes no Microsoft Graph calls, so the bot needs no Graph permissions.


What you need

  • Global Administrator (or Application Administrator) on the Microsoft 365 tenant.
  • The Azure portal (portal.azure.com) and the Teams Admin Center (admin.teams.microsoft.com).
  • A public https address for this FreeITSM install, set on Tickets β†’ Settings β†’ Messaging. Teams only delivers to https, and it fetches the images you send from the same address.

1. Register the application

  1. Azure portal β†’ Microsoft Entra ID β†’ App registrations β†’ New registration.
  2. Name it, for example FreeITSM Teams bot.
  3. Supported account types: Accounts in this organizational directory only (Single tenant). No redirect URI.
  4. Register, then copy:
    • Application (client) ID β†’ Bot App ID in FreeITSM
    • Directory (tenant) ID β†’ Tenant ID in FreeITSM

2. Create a client secret

Certificates & secrets β†’ New client secret. Copy the secret's Value (not its ID) into App secret β€” Azure shows it once. Note the expiry date: when it passes, the bot stops until you add a new one.

3. Create the Azure Bot

  1. Create a resource β†’ Azure Bot β†’ Create. Type of app: Single Tenant; Use existing app registration with the same App ID and tenant.
  2. Open it β†’ Configuration β†’ Messaging endpoint: the webhook URL from FreeITSM's channel list (https://<your-address>/api/messaging/webhook.php?channel=<id>). Apply.
  3. Channels β†’ add Microsoft Teams β†’ accept β†’ save.

4. Add the channel in FreeITSM

Tickets β†’ Settings β†’ Messaging β†’ Add channel, provider Microsoft Teams. Fill in Bot App ID, Tenant ID and App secret, Save, then Test connection β€” green means Microsoft issued a token for the app.

5. Install the app in Teams

Open the saved channel β†’ Download Teams app package. You get a zip with the manifest and two icons, built from your App ID. In the Teams Admin Center β†’ Teams apps β†’ Manage apps β†’ Upload new app, choose it, then make sure it's published and available to the people who should use it.

The manifest's website, privacy and terms links point at this install, because Teams insists on https links there. Change them in the Teams Admin Center if your company has its own pages.

6. Try it

Find the bot under Chat in Teams and send a message. A ticket appears with the Teams origin. Reply from the ticket and the answer arrives in the same Teams chat.


Good to know

  • Only your own organisation. Only people in the Microsoft 365 tenant you entered can open tickets through the bot. A message from anyone else is refused, even if they find the bot.
  • One-to-one chats only. Group chats and channels are ignored β€” one conversation there is shared by many people.
  • No first contact. The bot can only answer people who have written to it first.
  • Matched to the person you already have. FreeITSM asks Teams for the person's email (from your Microsoft 365 directory, no extra permission needed). If someone in FreeITSM has that email, the ticket is theirs, with their other tickets and their company. If not, they become a contact with their real name.
  • Images only, outbound. A picture you attach is sent to Teams; other files are refused with a clear message. Microsoft fetches the picture from /api/messaging/media.php, so that path must be reachable from the internet with no login in front of it.
  • Ratings. If Tickets β†’ Settings β†’ CSAT β†’ Ask chat customers in their chat is on, the customer gets their rating question in Teams with five buttons.
  • No read receipts.

Troubleshooting

Symptom Likely cause
Test connection: AADSTS700016 The Tenant ID is wrong, or the app isn't in that tenant.
Test connection: invalid_client The secret is wrong or has expired β€” create a new one and paste its Value.
The bot doesn't answer The Messaging endpoint isn't the webhook URL, or the Microsoft Teams channel isn't enabled on the Azure Bot.
Messages are refused (403) The App ID or Tenant ID in FreeITSM doesn't match the Azure Bot β€” or the person writing is in another organisation.
Images show as broken /api/messaging/media.php isn't reachable from the internet, or a proxy blocks Microsoft.
People can't find the app It isn't published or available to them (Teams Admin Center β†’ Manage apps).

Related: Mattermost channel Β· Slack channel Β· Telegram channel Β· Teams and Mattermost β€” Developer Guide

FreeITSM

Getting Started

Modules

Multi-tenancy (planned)

Blue sky thinking

Bugs resolved

Links

Clone this wiki locally