Bringing a bot to Microsoft Teams

Member·8 minutes to read

What this does for you

Your bot — or a Team Bot you published — becomes an app in your organisation's Microsoft Teams. People chat with it one to one, @mention it in a channel of a team it was added to, and it answers in the thread, with the same tools, connectors and approvals it has here.

Before you start

  • The bot is yours. Only the member a bot belongs to can bring it to Microsoft Teams; for a Team Bot, that is the member who published it. Work started in Teams runs as that member, with their connectors and their access.
  • Microsoft Teams is set up on your deployment. The people who run your deployment register one Teams app for it. Until they have, the section is greyed out and says so.
  • You have a work or school Microsoft account in the Microsoft 365 organisation you want the bot in. Personal Microsoft accounts have no Teams admin to approve an app.
  • Your organisation's residency policy allows Microsoft Teams. Messages in Teams are processed by Microsoft Ireland Operations Limited; an organisation whose policy rules that out cannot use this channel, and the press says so.

Bringing the bot in

You do this in the bot's details pane, under Microsoft Teams.

  1. Press Bring … to Microsoft Teams. The button names your bot. You sign in to Microsoft as yourself; the sign-in token is used for that one press and never stored. Your Microsoft account id is kept, so only you can decide the bot's approvals in Teams.
  2. Your Teams admins approve the app, once. The first time anyone in your Microsoft 365 organisation brings a bot in, the app is sent to your Teams admins for review. The section then says Waiting for a Teams admin to approve the app. and when the request was last submitted. Your Teams admin finds it in the Teams admin center under Teams apps → Manage apps, with the status Submitted. Once one bot is approved, the next member's bot needs no second approval.
  3. Press Check approval. It asks Microsoft where the request stands. Nothing is sent again.
    • Approved: the app is installed for you and the section says the bot is in Microsoft Teams.
    • Still waiting: the section says so again. Check later.
    • Declined: the section says A Teams admin declined the app. Talk to your admin, then press Resubmit to send it for review again.
  4. Add it to a team. Under Teams the section lists the teams you are in. Press Add to this team next to one; when Microsoft lets it in, the row says Added. A team where your Teams admin does not allow apps is refused, and nothing changes.

Talking to the bot in Teams

  • One to one. Open the app's chat in Teams and just write. The message goes to the bot you brought in.
  • In a channel. @mention the app in a channel of a team you added it to. The bot answers in the thread of your post. After that, a reply in that thread reaches the bot without a second @mention; a thread the bot was never in is not read by it at all.
  • In a group chat. @mention the app and start with the bot's handle — @lookout what changed? — to say which bot you mean. When only one bot is in Teams for your Microsoft 365 organisation, the handle can be left out.
  • More than one bot. In a channel, the bot added to that team answers. Name another bot's handle after the @mention to ask that one instead.

Every message a bot sends in Teams carries a line saying it was generated by an AI assistant and naming the bot. It is part of the channel: no setting removes it.

Reacting, a status, and deleting its own message

When you have connected the Microsoft Teams connector to your own account (under Plugins), a bot can also act in Teams as you, each with your approval first:

  • React to a message in a channel or chat with an emoji.
  • Set your Teams status message, optionally until a time.
  • Delete a message you posted in a channel or chat. It refuses any message someone else posted.

Microsoft Teams: what this connector can do lists every tool and the permission each one asks for.

Approvals

In the one-to-one chat with the app, an approval arrives as a card with Approve and Decline. Only the member the bot belongs to can decide; anyone else who presses gets a note that it is not theirs to decide, and nothing is recorded. A request raised in a channel or a group chat is never posted there, where everyone could see and press it: you decide it in Botseon. There is no Always allow in Teams.

Taking the bot out of Teams

Press Remove from Teams in the same section. The bot stops answering in Teams at once; the bot itself, its conversations and everything it had stay here. The bot's member or an administrator can remove it. A team owner removing the app from a team in Teams also stops the bot answering in that team.

Worked example

You made Lookout, a bot that watches your release notes, and want your team to ask it in the #releases channel.

  1. Lookout's details pane → Microsoft Teams → Bring Lookout to Microsoft Teams. Sign in.
  2. The section says it is waiting for a Teams admin. Your Teams admin approves Botseon in the Teams admin center.
  3. Check approval: Lookout is in Microsoft Teams.
  4. Under Teams, press Add to this team next to Engineering.
  5. In the Engineering team's releases channel, post:
@Botseon what changed in yesterday's release?

Lookout answers in the thread. A colleague replies in the same thread with a follow-up question, without an @mention, and Lookout answers that too.

What can go wrong

What you seeWhyWhat to do
Microsoft Teams is not set up on this deployment yet.Nobody has registered the deployment's Teams app.Ask the people who run your deployment; their checklist is in the operations runbook.
Microsoft Teams is unavailable while this instance runs with no outbound calls.Your instance runs with outbound calls switched off.Teams needs outbound calls to Microsoft.
Only the member this bot belongs to can bring it to Microsoft Teams.The bot is someone else's.Ask its member, or bring your own bot.
Waiting for a Teams admin to approve the app.Your Teams admins have not reviewed the app yet.Ask a Teams admin, then press Check approval.
A Teams admin declined the app.The review was declined, or your organisation does not let members submit apps.Talk to your Teams admin, then press Resubmit.
Microsoft Teams did not let the app into that team.The team's settings or your Teams admin's policy refuse the app.Ask the team owner or your Teams admin.
Microsoft Teams wants a team owner or a Teams admin to allow the app to read that team’s channel messages.Adding the app grants it the right to read that team's channel messages, so it can follow a thread without an @mention. Your organisation lets only team owners, or only Teams admins, grant that.Ask a team owner to press Add to this team, or ask your Teams admin to let team members consent to apps' team permissions.
Your organisation’s data residency policy does not allow Microsoft Teams.Your organisation keeps data in a region Teams processing is not in.An administrator decides the residency policy.
That did not work, and nothing was changed.Microsoft did not answer as expected.Try again; nothing was half done.
The bot does not answer in a channel.The post did not @mention the app, the app is not in that team, or the thread is not one the bot was in.@mention the app in a team it was added to.

Last verified against build c24d135.