Connect Microsoft Teams

Contents

Open beta

Microsoft Teams support is in beta, and it is not enabled for every project. If you do not see Microsoft Teams under Support > Settings, ask us to turn it on.

The SupportHog bot connects a Microsoft Teams tenant to PostHog Support. Channel messages and @SupportHog mentions become tickets, and replies you send in PostHog go back to the Teams thread.

This is separate from PostHog's Microsoft Teams destination, which sends alerts. SupportHog has its own bot and its own connection.

Connect Microsoft Teams

Connect Teams

Connecting requires an organization admin in PostHog, and a Microsoft account that can authorize the SupportHog app.

  1. Go to Support > Settings and open the Microsoft Teams channel.
  2. Click Connect Microsoft Teams.
  3. Sign in and authorize the app.
  4. Click Add Teams channel.
  5. Select a team group. PostHog installs SupportHog into that group.
  6. Select a channel. Shared channels show as #channel-name (shared).

You can add up to 25 channels, from more than one team group. A top-level message in a configured channel creates a ticket. Thread replies on that message sync as ticket messages.

What the connection can do

PermissionPurpose
Team.ReadBasic.AllList team groups
Channel.ReadBasic.AllList channels in those groups
TeamsAppInstallation.ReadWriteForTeamInstall SupportHog into a team group
User.ReadBasic.AllResolve a Teams user's name and email
ChannelMessage.Read.AllRead messages in shared channels
ChannelMessage.SendPost confirmations and replies into shared channels

The Microsoft account you connect with is the account PostHog uses for these calls, including shared-channel polling. That account needs access to every channel you monitor.

Bot mentions

Bot mention is always on. Anyone can @SupportHog in a channel the bot is in, and that message becomes a ticket. There is no emoji trigger in Teams. The :ticket: reaction is Slack only.

Standard and shared channels

Channel typeHow messages arriveDelayWhat you see
StandardBot Framework, as they are postedNoneChannel name only
SharedPolled with Microsoft GraphUp to one minuteShared · polled

Shared channels do not push ordinary messages to a bot, so PostHog polls them with Microsoft Graph (messages/delta) once a minute.

  • The first poll reads existing history and does not create tickets. Old messages do not appear as new tickets.
  • Later polls create tickets only for messages posted after that.
  • If Microsoft expires the cursor, PostHog starts the cursor again and skips history the same way.

Hover the Shared · polled tag in settings for the same explanation.

Add SupportHog to your org catalog

Most tenants install SupportHog from the connection flow. Some tenants block apps that are not in their own catalog. When that happens, PostHog shows SupportHog isn't available in your Microsoft tenant's app catalog after you pick a team group.

A Teams admin then uploads the SupportHog app package to the tenant org catalog. This is a one-time step. After the upload, click Retry install in PostHog and select the channel again.

SupportHog is not in the Microsoft Teams store yet. To get the app package, open a ticket with us and we will send it to you.

How tickets are created

A top-level message in a configured channel, or an @SupportHog mention, does all of the following:

  • Creates a ticket with the message as the first comment
  • Resolves the sender's name and email
  • Sets channel_source to teams
  • Posts a confirmation card in the thread with the ticket number and a link to PostHog
Microsoft Teams: How tickets are created

Messages from bots, system events, deleted messages, and empty messages are ignored.

Two-way sync

Teams to PostHog

  • New top-level messages in configured channels create tickets
  • Thread replies sync as ticket messages

PostHog to Teams

A reply from your team is posted back to the original thread, with that person's name. Private notes are never sent to Teams.

View Teams tickets

Teams tickets appear in the inbox with the other channels. Each one shows a Teams icon and the sender's name. Filter the list by channel to see only Teams tickets.

Disconnect

  1. Go to Support > Settings
  2. Open Microsoft Teams
  3. Click Disconnect Microsoft Teams

Existing tickets stay in the inbox. New Teams messages no longer sync.

Still have questions?

Was this page useful?