> For the complete documentation index, see [llms.txt](https://docs.autommate.com/userguide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.autommate.com/userguide/administration-and-runtimes/teams-bot-setup.md).

# Set up a Microsoft Teams bot for Autom Mate

Create the Azure Bot identity and Teams app that deliver messages to Autom Mate. This guide covers the infrastructure and credential setup shared by two routes: an AI Agent channel or a webhook-triggered Hyperflow. Choose the backend first so the bot points to the right generated endpoint.

## Collect the configuration

| Value                                         | Where you use it                                                                                            |
| --------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| Autom Mate-generated webhook URL              | Azure Bot **Messaging Endpoint**. Use the AI Agent channel URL or the chosen Hyperflow's webhook, not both. |
| Microsoft App ID                              | Teams app **Bot ID** and the Autom Mate Microsoft Teams credential.                                         |
| Microsoft Entra Tenant ID                     | The Autom Mate credential and the bot's tenant configuration.                                               |
| Client Secret **value**                       | The Autom Mate credential. This is different from the secret's identifier.                                  |
| App name, descriptions, icons and policy URLs | Teams app package metadata.                                                                                 |
| Intended scopes and permissions               | Teams app manifest and organisational approval.                                                             |

You need an Azure subscription/resource group, permission to create or manage the bot identity, and a Teams administrator or approved custom-app installation route. Keep secrets in your credential store and redact them from screenshots.

## 1. Prepare the Autom Mate endpoint

For an AI Agent, open **AI Agent Composer → your agent → Channels → Microsoft Teams** and copy **Webhook URL**. Follow [Connect an AI Agent to Teams](/userguide/ai-agent-composer/choose-and-connect-an-agent-channel/teams-ai-agent-channel.md) to finish that route.

For a Hyperflow bot, create the Hyperflow, select its **Webhook** trigger and copy the generated URL. Complete the required API-key setup for that generated webhook if prompted by your instance. Use [webhook and API configuration](/userguide/integrations-and-api/webhooks-api-rules-and-responses.md); never reuse an API key from an example or reconstruct the query string from memory.

## 2. Create or select the Azure Bot

In the [Azure portal](https://portal.azure.com), create an **Azure Bot** resource. Set its name, subscription and resource group, then select the approved pricing and identity configuration. For an organisation-only installation, plan a single-tenant bot and ensure its identity configuration matches the Autom Mate Teams credential you use.

Microsoft no longer supports creating new multi-tenant Azure bots after 31 July 2025; existing multi-tenant bots can continue. Do not change **Supported account types** to allow all tenants as a routine troubleshooting step. Review cross-organisation deployments separately. See [Register a bot with Azure](https://learn.microsoft.com/en-us/azure/bot-service/bot-service-quickstart-registration?view=azure-bot-service-4.0).

After resource creation, open **Channels**, add **Microsoft Teams** and save. In **Configuration**, set **Messaging Endpoint** to the complete Autom Mate-generated URL. Reopen the field to confirm the change saved.

## 3. Prepare the bot credential

Copy the bot's **Microsoft App ID** and **Tenant ID**. Open its associated application registration and create an approved client secret in **Certificates & secrets** if the selected identity setup requires one. Record the secret value securely and its expiry so it can be rotated before it stops working.

In Autom Mate **Vault**, create the Microsoft Teams credential profile using the **Tenant ID**, **App ID** and **Client Secret**. Select this profile in the AI Agent channel or Microsoft Teams action. The bot resource, Teams app Bot ID and credential must refer to the same application identity.

## 4. Create the Teams app package

In [Teams Developer Portal](https://dev.teams.microsoft.com), create an app. Complete **Basic information**: app names, short and long descriptions, developer/company name, website, privacy policy and terms-of-use URLs. Add the required branding icons. Follow the limits shown by the current manifest editor rather than copying old screenshots.

Under **App features → Bot**, set **Bot ID** to the Microsoft App ID. Choose the required scopes: **Personal**, **Team** and/or **Group Chat**. Enable only the scopes you intend to test and support.

### Choose permissions deliberately

The earlier Autom Mate bot example included these resource-specific application permissions:

| Permission                  | Resource scope                                  |
| --------------------------- | ----------------------------------------------- |
| `ChannelMessage.Read.Group` | Read messages in the relevant team.             |
| `ChannelMessage.Send.Group` | Send messages to channels in the relevant team. |
| `ChatMessage.Read.Chat`     | Read messages in the relevant chat.             |
| `ChatMessage.Send.Chat`     | Send messages in the relevant chat.             |

These are not a blanket requirement for every personal bot conversation. Select permissions for the actions and scopes your design uses. Resource-specific consent belongs in the Teams app manifest and applies to the resource where consent is granted; it is not an instruction to grant tenant-wide Graph access. See [Microsoft's resource-specific consent guide](https://learn.microsoft.com/en-us/microsoftteams/platform/graph-api/rsc/resource-specific-consent).

## 5. Validate and distribute

Run **App validation** in the Developer Portal. Resolve errors and review each warning; do not assume a fixed set of warnings is safe to ignore. Download the package when ready. See [Developer Portal validation](https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/manage-your-apps-in-developer-portal).

Use the distribution route approved by your organisation: an authorised test-user upload or an administrator-managed app deployment. The original installation uses **Teams admin center → Teams apps → Manage apps → Upload new app**. Availability in the client also depends on your tenant's policies and selected scopes. Follow [Microsoft's custom-app upload guide](https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/deploy-and-publish/apps-upload) for the current route. Do not promise an exact propagation time.

## 6. Prove the message round trip

For a generic Hyperflow test, add a **Send Message** action from the [Microsoft Teams library](/userguide/integrations-and-api/libraries/integration/microsoft-teams.md), select the credential and map the conversation context supplied by the incoming Teams event as required by that action. Set a fixed reply such as **Hello from Autom Mate**. Send a message from the approved Teams test user and confirm that exact reply returns to the same conversation.

For an AI Agent, test the channel using [the AI Agent connection guide](/userguide/ai-agent-composer/choose-and-connect-an-agent-channel/teams-ai-agent-channel.md). If moving from the generic test flow to the AI Agent, update the messaging endpoint deliberately and repeat the test.

Inspect the run log when the response is missing. Separate endpoint/authentication failures from action-input errors and Teams app policy restrictions. Keep a record of the app and tenant IDs, package version, tested scope and credential owner; do not include the secret or key-bearing webhook in that record's public version.
