- Receive messages from Teams users, starting a new run with the message content.
- Respond directly in Teams conversations using the Bot Framework.
- Access Teams channels and messages through Microsoft Graph API tools.
In channel conversations, the bot only responds when explicitly mentioned. In direct messages and group chats, the bot responds to all messages.
Prerequisites
- An existing agent in Fleet (see Quickstart to create one)
- An Azure account with permission to create resources
- Admin access to a Microsoft Teams workspace, or permission to install apps
Create an Azure Bot
Before registering in Fleet, you need to create an Azure Bot resource and obtain its credentials.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.
- Type of App: Select Multi Tenant.
- Creation type: Select Create new Microsoft App ID.
- Click Review + create, then Create.
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. You will need this later.
- Click Manage Password next to the App ID.
- Click New client secret, add a description, and click Add.
- Copy the Value of the new secret immediately — it is only shown once.
Register the bot in Fleet
Open the integrations page
- Navigate to Fleet in the LangSmith UI.
- Go to the Integrations page.
- Click Add Teams App.
Enter your credentials
Fill in the following fields:
- App Name: A display name for the bot in Fleet.
- Azure App ID: The Microsoft App ID from the Azure Bot resource.
- Azure App Password: The client secret value you copied earlier.
- Azure Tenant ID (optional): Your Azure AD tenant ID. Leave as default for multi-tenant bots.
Copy the webhook URL
After registration, Fleet displays a webhook URL. Copy this URL—you need it to complete the Azure Bot configuration.
Set the messaging endpoint in Azure
- Return to your Azure Bot resource in the Azure Portal.
- Go to Configuration.
- Paste the webhook URL from Fleet into the Messaging endpoint field.
- Click Apply.
Add the bot to Teams
Open the Teams channel
- In the Azure Portal, go to your bot resource.
- Click Channels in the left sidebar.
- Select Microsoft Teams and click Apply.
- Agree to the terms of service.
Install the bot in Teams
- In Teams, click Apps in the left sidebar.
- Click Manage your apps then Upload an app.
- Upload a Teams app manifest that references your Azure App ID, or use the Open in Teams link from the Azure Bot Channels page.
- Add the bot to the desired team or chat.
Link the bot to an agent
You can link a Teams bot to an agent from the integrations page or from the agent editor.Link from the integrations page
- Navigate to the Teams Apps section on the Integrations page in Fleet.
- Select the bot you want to link.
- From the dropdown menu, choose the agent you want to link to.
Link from the agent editor
- Select your agent from My Agents in the left-hand navigation.
- Click Edit Agent.
- Scroll to the Channels section.
- Click Teams.
- From the dropdown menu, select the Teams app you want to link.
Add Teams tools
Tools let your agent take actions in Teams. To respond to messages and interact with Teams, add the relevant tools.- In the agent editor, scroll to the Tools section.
- Click + Add.
- Search for “Teams” and add the tools you need:
- teams_bot_send_proactive_message — Send messages back to the Teams conversation
- microsoft_teams_list_my_teams — List teams the authenticated user belongs to
- microsoft_teams_list_channels — List channels in a team
- microsoft_teams_post_channel_message — Post a message to a channel
- microsoft_teams_read_channel_messages — Read recent messages from a channel
- If prompted, click Connect to authorize the Microsoft Graph tools.
- Click Save changes.
The
teams_bot_send_proactive_message tool uses Bot Framework credentials and does not require separate OAuth authorization. The other Teams tools use Microsoft Graph API and may require OAuth consent.Configure agent behavior (optional)
Your agent needs to know how to handle incoming Teams messages. Update its instructions by prompting it directly in the agent chat:Troubleshooting
Agent does not respond
- Check the thread in Fleet for any approvals that need human input.
- In channel conversations, make sure you @mention the bot. Channel messages without a mention are ignored.
- Check the Feed tab for errors.
- Verify the messaging endpoint in the Azure Bot resource matches the webhook URL from Fleet.
- Ensure the bot registration is not paused in Fleet.
Invalid credentials error during registration
- Verify that the Azure App ID and App Password (client secret) are correct.
- Make sure the client secret has not expired. Create a new secret in Azure if needed.
- Check that the bot type is set to Multi Tenant in Azure.
Bot works in direct messages but not in channels
- The bot must be explicitly @mentioned in channel conversations.
- Make sure the bot has been added to the team and has permission to read messages in the channel.
Next steps
Add more tools
Connect additional services to your agent
Add more channels
Set up email, schedule, or webhook channels
Use templates
Start from a prebuilt agent template
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

