- Start a run when someone messages the bot in a personal chat, or @mentions it in a channel or group chat.
- Reply in the Teams conversation and read the thread for context.
- Access Teams channels and messages through Microsoft Graph tools.
Choose a setup path
Add to Teams in one click
On LangSmith Cloud, sign in to Microsoft and Fleet creates the bot in your organization.
Use your own Azure Bot
Create an Azure Bot yourself and connect it to Fleet. Use this path on self-hosted LangSmith.
Add a Teams bot in one click
On LangSmith Cloud, Fleet creates the agent’s bot in your Microsoft organization and connects it to the agent.Requirements
- A saved agent in Fleet that you can edit.
- A Microsoft work account that can register apps in Microsoft Entra ID.
- An Azure subscription with a resource group where that account can create resources.
To create the bot, LangSmith asks Microsoft for permission to create app registrations, add apps to your organization’s Teams app catalog, and manage Azure resources as the person who signs in. These permissions need an administrator’s consent. The first time anyone in your Microsoft organization adds a bot, an Application Administrator, Cloud Application Administrator, or Global Administrator must sign in and consent on behalf of the organization. After that, other people can add bots without an administrator.
Add the bot
1
Open Microsoft Teams in the agent's channels
In Fleet, open your agent. In the sidebar, expand the Channels drawer, connect a channel, and select Microsoft Teams.If Fleet opens the Azure Bot setup instead of showing Add to Teams, follow Use your own Azure Bot.
2
Sign in to Microsoft
Click Add to Teams. The bot takes the agent’s name, shortened to 30 characters. Sign in with your work account in the Microsoft tab that opens.
3
Choose where the Azure Bot goes
Choose an Azure subscription, then a resource group, and click Create the bot.
4
Wait for setup to finish
Setup can take a few minutes. When it finishes, Fleet shows Added to Teams, connects the bot to the agent, and adds the Teams tools.
- App registration in Microsoft Entra ID, which the bot signs in as. Fleet stores a client secret for it.
- Azure Bot on the free (F0) tier in the subscription and resource group you chose, with the Microsoft Teams channel turned on. By adding the bot, you agree to Microsoft’s terms of service for the Teams channel.
- Teams app for the bot in your organization’s app catalog.
Get the bot approved in Teams
How the bot reaches Teams depends on who signed in:- A Teams admin: Fleet publishes the bot’s Teams app to your organization. In Teams, open Apps, then Built for your org, and add the bot.
- Anyone else: Fleet submits the Teams app for approval. A Teams admin approves it under Pending approval in the Teams admin center. People can then add the bot from Apps > Built for your org.
Remove a one-click bot
Only the person who connected the bot can remove it, and they must be able to edit the agent. To remove the bot:- In the agent’s Channels drawer, open the menu on the Microsoft Teams row and click Delete.
- Click Sign in and remove, then sign in with an account in the bot’s Microsoft organization.
Delete an agent that has a one-click bot
Deleting the agent deletes its bot’s credentials from LangSmith without a Microsoft sign-in. The bot’s Teams app, Azure Bot, and app registration stay in your organization, and Fleet lists what to remove there after you delete the agent. To remove the bot from Microsoft as well, the person who connected it can click Remove the Teams channel first instead in the delete dialog.Use your own Azure Bot
Create an Azure Bot yourself, connect it to Fleet, and install it in Teams. Use this path on self-hosted LangSmith, or when you want to manage the bot in Azure yourself.Prerequisites
- A saved agent in Fleet that you can edit. An unsaved agent shows Save your agent first to add a Teams bot. See Quickstart to create one.
- An Azure account with permission to create resources.
- Permission to upload and install custom apps in your Microsoft Teams organization. Your Teams administrator may need to enable custom app uploading.
Set up the bot
1
Create an Azure Bot resource
- Go to the Azure Portal.
- Search for Azure Bot and click Create.
- Fill in the required fields:
- Bot handle: A unique identifier for your bot.
- Subscription: Select your Azure subscription.
- Resource group: Create a new one or select an existing one.
- Pricing tier and Data residency: Choose settings for your organization. See Azure Bot pricing and regionalization. A regional bot alone does not guarantee end-to-end data residency.
- Type of App: Select Single Tenant.
- Creation type: Select Create new Microsoft App ID.
- Click Review + create, then Create.
Azure no longer allows new Multi Tenant bots.
2
Get your app credentials
After the resource is created:
-
Navigate to your bot resource and click Configuration in the left sidebar.

-
Copy the Microsoft App ID and the App Tenant ID for the Fleet setup wizard.

- Click Manage Password next to the App ID.
- Click New client secret, add a description, and click Add.
- Copy the secret Value, not the secret ID. The value is only shown once; if you lose it, create a new secret.
3
Configure the Azure connection
-
Open the Fleet setup wizard from either place:
- From the agent: In the agent’s Channels drawer, connect a channel and select Microsoft Teams. If Fleet offers Add to Teams, click Use your own Azure bot instead.
- From Integrations: In Fleet, open Integrations > Apps > Microsoft Teams and click Add Teams bot. In some workspaces, open Integrations > Slack & Teams and click Add Teams Bot.
- Copy the webhook URL from the first screen of the Fleet wizard.
- In your Azure Bot resource, go to Configuration. Paste the URL into Messaging endpoint and click Apply. Streaming Endpoint is not required.
- Go to Channels, select Microsoft Teams, and agree to the terms of service.
- On the Messaging tab, select the cloud environment for your Teams organization and click Apply.
-
Confirm Microsoft Teams appears in the connected channels list and check its status.

4
Register and link the bot
-
Return to Fleet, click Continue to Credentials, and enter:
- Bot display name: A name for the bot.
- Azure App ID (Client ID): The Microsoft App ID from Azure.
- Azure Tenant ID: The App Tenant ID from Azure. Use the GUID, not a domain name or your Fleet workspace ID.
- Client Secret (App Password): The secret value you copied.

-
Click Continue, then Download Teams App Package. Keep the ZIP for installation.

- Click Continue, choose the agent, and click Finish. The list shows only agents you can edit. If you started from the agent’s Channels drawer, click Save & Connect instead.
5
Install and test the bot in Teams
- In Teams, go to Apps > Manage your apps > Upload an app.
-
Select Upload a custom app and choose the ZIP downloaded from Fleet.

- Follow your organization’s approval process if required, then add the app to a team or chat.
- Send a message and confirm the agent replies. In channels and group chats, @mention the bot.
Remove your own Azure Bot
Only the person who connected the bot can remove it, and they must be able to edit its agent. In the agent’s Channels drawer, open the menu on the Microsoft Teams row, click Delete, then click Remove. LangSmith deletes the stored client secret and the agent’s Teams channel. The bot stays in Azure, where you can delete it if you no longer need it. Deleting the agent does the same.Move a bot to another agent
Each Teams bot belongs to the agent you added it to and only works with that agent. Integrations lists your workspace’s Teams bots and their agents. Manage each bot from its agent’s Channels drawer. To use a bot with a different agent, remove it and add it again:- One-click bot: Remove it, then add a new bot from the other agent’s Channels drawer.
- Your own Azure Bot: Remove it, then connect it to the other agent with the same App ID, tenant ID, and a client secret.
Who the agent runs as
Teams works with agents of either identity. The account a Teams message runs the agent as depends on its identity and who it is shared with:- Fixed credentials, shared with the whole workspace: Anyone in a conversation with the bot can use it. The agent runs as the person who connected the bot, with the agent’s own accounts.
- Any other agent: Each person links their Microsoft account to LangSmith once, and their messages run the agent as them, with their own connected accounts. They must be a member of the agent’s workspace. Unless the whole workspace can run the agent, they must also be its owner or someone it is shared with.
- Message the bot. If your Microsoft account is not linked, the bot replies with a link to LangSmith.
- Open the link and click Sign in with Microsoft, using the account you use in Teams.
- When LangSmith shows Linked, go back to Teams and send your message again.
Add Teams tools
When you connect a bot to an agent, Fleet adds two tools:- Teams Bot Reply (
teams_reply_to_message): Sends a reply to the originating Teams conversation. A response in Fleet alone is not a Teams reply. - Teams Read Thread (
teams_read_thread_messages): Reads the conversation’s thread for context.
teams_bot_send_proactive_message tool is for messages outside a direct reply, such as notifications.
Troubleshooting
Resolve installation errors
Teams can reportInvalidUserId with “Incorrect bot configuration/registration, please check the bot settings.” This message alone does not identify the cause.
Before recreating the bot or changing settings, check the following:
- Azure and Fleet: Confirm the Teams channel is enabled for the correct cloud. Verify the bot’s App ID, tenant ID, and Single Tenant app type. Use the same IDs in Fleet.
- App package: In the ZIP’s
manifest.json, check thatbots[].botIdmatches the Azure Bot’s App ID. The top-levelididentifies the Teams app and can differ from the bot ID. - Teams organization: Install in the intended organization and confirm its policies allow the custom app.
- The exact failure time and time zone, the step reached, and an error screenshot.
- The failed request URL, HTTP status, error response, and request or correlation IDs, if available.
- The Azure Bot’s App ID, App Tenant ID, app type, and Teams channel status and cloud environment.
- The exact app ZIP used for the failed installation.
Fleet refuses the bot’s credentials
When you connect your own Azure Bot, Fleet checks its credentials with Microsoft and shows what Microsoft refused:- Copy the Application (client) ID and the Directory (tenant) ID from the app registration’s Overview page. Both are GUIDs.
- Use the client secret’s Value, not its Secret ID. A secret added in the last few minutes can take a minute to work.
- If the secret has expired, add a new one under Certificates & secrets and use its value.
- Connected in another LangSmith workspace: Remove it from that workspace first.
- Already connected in this workspace: Delete it from Integrations, then add it again.
Agent does not respond
- Check the Fleet run for a
teams_reply_to_messagecall and its result. If the tool is missing, add it to the agent. If the agent does not call it, update its instructions and test again. Instructions do not guarantee a tool call. - Check the Fleet thread for approvals, the Feed tab for errors, and whether the agent’s channels are paused.
- If the bot replies with a link to your Microsoft account or says the agent is private, see Who the agent runs as.
- In channels and group chats, @mention the bot and confirm the app is installed in that team or group chat.
- For a one-click bot that shows Waiting for Teams admin, ask a Teams admin whether they approved its Teams app, or add the bot from Apps > Built for your org.
- For your own Azure Bot, verify the Azure messaging endpoint matches Fleet’s webhook, and confirm the client secret has not expired in Azure. To use a new secret, remove the bot and add it again.
Connect these docs to your agent of choice via MCP for real-time answers.

