Docs Talk to your agent

Microsoft Teams

Create the bot, upload the app package and talk to an agent in Teams.

Put your agents in Microsoft Teams so people can ask them questions in team channels, group chats and 1:1 chats, and so review results post to a Teams channel. Each agent gets its own bot, which you make in your own Microsoft 365 tenant. Entropix builds the Teams app package for each bot; you upload it to Teams.

In the portal Settings › Channels › Teams Admin

Before you start

  • You need the Admin role in Entropix.
  • You need access to the Teams Developer Portal in your tenant, and someone who can upload custom apps in Teams.
  • Keep your tenant id to hand. It is on the Overview page of the Microsoft Entra admin centre.
  • Read Channels: how they work for linking accounts, threads, goals and approvals. They work the same in every channel.

The page works through four steps until a bot is in a team. The current step is open; done steps show a done badge. After that the page manages your bots instead (below).

Create the bots

Do this once for each agent you want in Teams.

  1. Open the Teams Developer Portal. Under Tools, open Bot management and click New bot. Name it after the agent.
  2. Open the bot, then Client secrets, and click Add a secret. Copy the secret now; Microsoft shows it once.
  3. Copy the bot's id. It is a GUID.
  4. Back in Entropix, in step 1, Create the bots, pick the Agent and fill in Bot id, Client secret and Tenant id. Click Register bot.
  5. Step 2 now shows the agent's Endpoint address. It ends in /hooks/teams/ and a code that belongs to that bot alone. Copy it.
  6. In the Developer Portal, open the bot's Configure page and set Endpoint address to that address.

The client secret is stored encrypted and never shown again. You can also register a bot, or replace its secret, on the agent's Connections tab (Register its bot, Replace the client secret). When every agent has a bot, step 1 says Every agent already has a Teams bot.

Add them to your teams

  1. In step 2, Add them to your teams, click Download <bot>.zip beside the agent. This is the agent's Teams app package.
  2. Upload it in the Teams admin centre (Teams apps › Manage apps › Upload new app), or in Teams (Apps › Manage your apps › Upload a custom app).
  3. Add the app to a team. Teams asks you to agree to two permissions: read channel messages and read chat messages.
  4. The row's state changes to In <team>.

The two permissions let the bot hear a reply in its thread without being @mentioned. Without them, Teams sends the bot only @mentions.

StateWhat it means
Registered — the app is not in a team yetThe bot is registered. Upload its package and add it to a team.
In <team> or InstalledThe bot is in Teams.
Failed: <reason>Something is wrong with the bot. Fix the reason, then click Retry.
Turning offEntropix is removing the bot.

What is in the package

The zip holds a Teams app manifest and two icons made from the agent's initial. The manifest names the bot by its id, lets it work in a team, a group chat and a 1:1 chat, and asks for the two read permissions above. Download it again whenever you need it; it is built fresh each time.

Add more agents later

Once a bot is in a team, the page stops showing the four steps. It shows, in order:

  • Add a bot at the top, when some agent has no Teams bot yet. It jumps to the list of those agents.
  • Bots: one row per agent that has a bot, with its state, its review channel and its actions.
  • The agents without a bot, each with the Register bot form. When there are none it says Every agent has a bot.
  • Review channel, with Change to pick another.
  • Try it, folded.

You can also add a bot from the agent's Connections tab: its Teams row links to the form with the agent already picked.

Set the review channel

Step 3, Review channel, is where finished reviews post. Until you set one, it says None set yet — a review posts nowhere until one is. The picker works once a bot is in a team.

  1. Click Change channel.
  2. Type part of a name in Search channels and click Search.
  3. Pick the channel and click Save.

Installing the app in a team covers its standard channels. A private or shared channel needs the app added there too, and is not listed until it is.

Try it

  1. @mention the bot in a channel of a team it is in, or message it in a 1:1 chat.
  2. The first time, the bot sends you a one-time link in a 1:1 chat, not in the channel, so nobody else can use it. If the bot is not installed for you personally, it mentions you under your post instead. Open the link and click Link. See Channels: how they work.
  3. Send your message again. The agent answers in the post's thread.

Step 4, Try it, shows how many people have linked Teams.

Turn Teams off

  • For one agent: click Turn Teams off on its row in step 2, or on its Connections tab.
  • For everyone: under Danger zone, click Turn Teams off for every agent. The page shows Turning off — removing the agents' bots from Entropix.

If a bot fails, Forget now makes Entropix forget the bots at once.

Careful

Teams gives Entropix no way to remove an app from a team. After you turn Teams off, remove each app in the Teams admin centre yourself.

How it works

  • Teams sends each message to the bot's endpoint address, /hooks/teams/<code>. It must be reachable from the internet; see Webhooks and public endpoints.
  • Each delivery carries a token signed by Microsoft. Entropix checks the token against the bot's id and Microsoft's signing keys before it stores anything. A delivery that fails the check, names an unknown address, or reaches a bot that is turned off is refused, and nothing is stored.
  • A message from another Microsoft 365 tenant is ignored, and the bot is marked failed until you fix the tenant id.
  • In a team channel, the agent answers @mentions, and replies in its threads. In a group chat, @mention the bot first; after that the chat is one conversation. In a 1:1 chat, every message is for the agent.
  • When the agent wants to run an Asks first tool in a chat thread, it asks there: reply yes or no. A goal's action is decided on the portal only. An admin answers a memory change in the thread with "approve" or "reject", or several with "approve all" or numbers ("approve 1,3"). See Approvals in a thread and Approve actions.
  • Anything an agent posts in a channel is visible to everyone in it.

What you can and can't do

You can
  • Give each agent its own bot in your own tenant.
  • Use agents in team channels, group chats and 1:1 chats.
  • Download an agent's app package again at any time.
  • Pick one review channel for the organisation.
You can't
  • Have Entropix upload the app or remove it from a team; you do both in Teams.
  • Use one bot across two tenants.
  • Send the agent files in Teams; it reads attached files in Slack and Discord only.

Troubleshooting

MessageWhat it means and what to do
Microsoft rejected that app id, secret or tenant idOne of the three is wrong. Copy them again from the Developer Portal and the Entra admin centre.
paste the tenant idThe tenant id field was empty.
the tenant id is a GUID or a domain namePaste the tenant id from Entra's Overview page.
The app was used in another Microsoft 365 tenant. Paste the tenant id of the tenant where you uploaded the app, then press Retry.The package was uploaded in a different tenant from the one you registered. On the agent's Connections tab, use Replace the client secret with the right tenant id, then click Retry.
Add a bot to a team first (step 2).The review channel picker needs a bot in a team. Upload and add the app first.
Teams isn't set up on this portal: it needs a secret key.The portal cannot store secrets yet. Contact whoever runs your portal.
Entries under Stuck postsPosts Teams would not accept after several tries, with the reason. Check the app is still in that team.