> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Microsoft Teams OAuth 2.0 (Bot Framework) connector profile – StackOne setup guide

> Set up a connector profile using OAuth 2.0 (Bot Framework) for Microsoft Teams in StackOne to allow users to link their accounts.

> [!WARNING]
>
> You must have at least Application Developer permissions in your Azure account to register applications in Microsoft Entra ID. Requires an Azure Bot resource linked to the same App Registration. The bot must be published to the Teams App Catalog (org or Store) before users can connect.

Select Actions to adjust the guideSome actions may require additional configuration in the provider to be accessible. Choose the actions you need and the guide will be updated.

Select all
Clear

ActionScope(s)

Loading actions...No actions match your search.

Dynamic Guide URL

Copy URL

Scopes Selected

<pre role="textbox" aria-readonly="true" tabIndex="0" />

Separator

Copy scopes

## Register your application in Microsoft Entra ID

Register an application in Microsoft Entra ID to get the OAuth 2.0 credentials. A single App ID and Secret is used for both Graph API and Bot Framework.

**1. Start a new app registration**

Sign in to the [Microsoft Entra admin center](https://entra.microsoft.com).

<ul>
  <li>If you have access to multiple tenants, click the **Settings** (gear) icon in the top-right corner.</li>
  <li>Select the desired tenant from the list under **Directory + subscription**.</li>
  <li>Search for **App registrations** in the top search bar.</li>
  <li>Click **New registration**.</li>
</ul>

**2. Enter the app details**

Fill in the registration form, then select **Register** to create the app registration.

<ul>
  <li>**Name**: `StackOne Microsoft Teams Bot Integration`</li>
  <li>**Supported account types**: **Single tenant only - \<your tenant>** if only your organization will use this integration, or **Multiple Entra ID tenants** to support users from other Microsoft Entra tenants</li>
  <li>**Redirect URI (optional)**: select **Web**, then enter the **Callback URL** from your Connector Profile</li>
</ul>

**3. Copy the Client ID**

On the app's **Overview** page, copy the **Application (client) ID** to **Client ID** in your Connector Profile.

**4. Add Microsoft Graph permissions**

Enables actions: Add Channel Member, Add Chat Member, Add Team Member, Add Team Members In Bulk, Archive Channel, Archive Team, Bot Create Conversation, Bot Delete Activity, Bot Get Conversation Member, Bot Get Conversation Members, Bot Get Conversation Paged Members, Bot Reply To Activity, Bot Send To Conversation, Bot Update Activity, Change Password, Clone Team, Create Channel, Create Chat, Create Team, Create User, Delete Channel, Delete Channel Message, Delete Channel Tab, Delete Chat, Delete Chat Message, Delete Team, Delete User, Get Channel, Get Channel Files Folder, Get Channel Member, Get Channel Message, Get Channel Tab, Get Chat, Get Chat Member, Get Chat Message, Get Current User, Get Message Reply, Get Primary Channel, Get Team, Get Team Member, Get User, List All Channel Members, List All Channels, List Channel Members, List Channel Messages, List Channel Tabs, List Channels, List Chat Members, List Chat Messages, List Chats, List Incoming Channels, List Message Replies, List Team Members, List Teams, List Users, Remove Channel Member, Remove Chat Member, Remove Team Member, Remove Team Members In Bulk, Send Channel Message, Send Chat Message, Send Message Reply, Unarchive Channel, Unarchive Team, Undo Soft Delete Chat Message, Update Channel, Update Channel Message, Update Chat, Update Team

From the left menu under **Manage**, select **API permissions**.

<ul>
  <li>Click **Add a permission**.</li>
  <li>Select **Microsoft Graph**.</li>
  <li>Select **Delegated permissions**.</li>
  <li>Add each scope listed.</li>
  <li>Click **Add permissions**.</li>
</ul>

<ul>
  <li>
    Channel.ReadBasic.All
  </li>

  <li>
    Channel.Create
  </li>

  <li>
    Channel.Delete.All
  </li>

  <li>
    ChannelSettings.ReadWrite.All
  </li>

  <li>
    ChannelMember.Read.All
  </li>

  <li>
    ChannelMember.ReadWrite.All
  </li>

  <li>
    ChannelMessage.Read.All
  </li>

  <li>
    ChannelMessage.Send
  </li>

  <li>
    ChannelMessage.ReadWrite
  </li>

  <li>
    Chat.ReadBasic
  </li>

  <li>
    Chat.Read
  </li>

  <li>
    Chat.ReadWrite
  </li>

  <li>
    Chat.Create
  </li>

  <li>
    Chat.ManageDeletion.All
  </li>

  <li>
    ChatMember.ReadWrite
  </li>

  <li>
    ChatMessage.Send
  </li>

  <li>
    Team.ReadBasic.All
  </li>

  <li>
    Team.Create
  </li>

  <li>
    TeamSettings.ReadWrite.All
  </li>

  <li>
    TeamMember.Read.All
  </li>

  <li>
    TeamMember.ReadWriteNonOwnerRole.All
  </li>

  <li>
    TeamMember.ReadWrite.All
  </li>

  <li>
    Group.ReadWrite.All
  </li>

  <li>
    TeamsTab.Read.All
  </li>

  <li>
    TeamsTab.ReadWriteSelfForTeam
  </li>

  <li>
    Files.Read.All
  </li>

  <li>
    User.Read
  </li>

  <li>
    User.ReadBasic.All
  </li>

  <li>
    User.ReadWrite.All
  </li>

  <li>
    User-PasswordProfile.ReadWrite.All
  </li>

  <li>
    TeamsAppInstallation.ReadWriteSelfForUser
  </li>
</ul>

**5. Grant admin consent**

Click **Grant admin consent for \[tenant name]**.

<ul>
  <li>Select **Yes** to consent on behalf of all users in your tenant.</li>
  <li>Verify that **Granted for \[tenant name]** appears under the **Status** column.</li>
</ul>

**6. Create a client secret**

From the left menu under **Manage**, select **Certificates & secrets**.

<ul>
  <li>Under the **Client secrets** tab, click **New client secret**.</li>
  <li>**Description**: `StackOne Bot Integration Secret`</li>
  <li>**Expires**: an expiration period</li>
  <li>Click **Add**.</li>
  <li>Copy the new secret's **Value** into your Connector Profile.</li>
</ul>

## Create the Azure Bot resource

Create an Azure Bot resource linked to the same App Registration. This registers your app as a bot in the Bot Framework.

**1. Start a new Azure Bot**

Sign in to the [Azure Portal](https://portal.azure.com).

<ul>
  <li>Search for **Azure Bot** in the top search bar.</li>
  <li>Click **Azure Bot** under **Marketplace**. This opens the **Create an Azure Bot** page.</li>
</ul>

**2. Enter the bot details**

Fill in the bot's project details and plan.

<ul>
  <li>**Bot handle**: `stackone-teams-bot`</li>
  <li>**Resource group**: an existing group, or create a new one</li>
  <li>**Data residency**: **Global**, or **Regional** based on your requirements</li>
  <li>**Pricing**: click **Change plan** and select **Free (F0)** for testing or **Standard** for production</li>
</ul>

**3. Link the app registration**

Point the bot at the app you registered in Microsoft Entra ID.

<ul>
  <li>**Type of App**: **Multi Tenant**, or **Single Tenant** based on your requirements</li>
  <li>**Creation type**: **Use existing app registration**</li>
  <li>**App ID**: The **Application (client) ID** from your app registration (same as Client ID)</li>
  <li>**App tenant ID**: The **Directory (tenant) ID** from your app registration</li>
</ul>

![Create an Azure Bot form with the app registration fields highlighted](https://mintcdn.com/stackone-60/i0kcvb_VY8ptwUMB/connectors/microsoftteams/images/oauth2-setup-create-azure-bot.png?fit=max\&auto=format\&n=i0kcvb_VY8ptwUMB\&q=85\&s=8123de3c28df8299f44f4deb9964f504)

**4. Create the bot**

Click **Review + create**.

<ul>
  <li>Click **Create**.</li>
  <li>Once deployment completes, click **Go to resource** to open the Azure Bot resource.</li>
</ul>

![Go to Resource](https://mintcdn.com/stackone-60/i0kcvb_VY8ptwUMB/connectors/microsoftteams/images/oauth2-setup-go-to-resource.png?fit=max\&auto=format\&n=i0kcvb_VY8ptwUMB\&q=85\&s=ccebe5a7e8f1a441bb4f8b7f394768c5)

**5. Add the Microsoft Teams channel**

In the Azure Bot resource, expand **Settings** in the left sidebar.

<ul>
  <li>Click **Channels**.</li>
  <li>Click **Microsoft Teams** from the available channels list.</li>
</ul>

![Enable Teams Channel](https://mintcdn.com/stackone-60/i0kcvb_VY8ptwUMB/connectors/microsoftteams/images/oauth2-setup-settings-channels.png?fit=max\&auto=format\&n=i0kcvb_VY8ptwUMB\&q=85\&s=4fa670fa16d4531289457b02a31a03ff)

**6. Configure the Teams channel**

A configuration page appears with **Messaging**, **Calling**, and **Publish** tabs.

<ul>
  <li>Accept the Terms of Service if prompted.</li>
  <li>Select **Microsoft Teams Commercial** under **Messaging**.</li>
  <li>Click **Apply** to save the channel configuration.</li>
</ul>

![Configure Teams Channel](https://mintcdn.com/stackone-60/i0kcvb_VY8ptwUMB/connectors/microsoftteams/images/oauth2-setup-terms-of-service.png?fit=max\&auto=format\&n=i0kcvb_VY8ptwUMB\&q=85\&s=da40da43603971f04ac71ce8efc3a98c)

## Create the Teams app

Create a Teams app in the Teams Developer Portal that registers the bot for personal, team, and group chat scopes.

**1. Create the app**

Go to the [Teams Developer Portal](https://dev.teams.microsoft.com/apps).

<ul>
  <li>Click **New app** to open the **Create a new app** popup. If you already have an app, select it from the **Apps** list instead.</li>
  <li>**Name**: your app's name</li>
  <li>**Manifest version**: the latest stable version, for example **Latest Stable v1.25**</li>
  <li>Click **Create**.</li>
</ul>

![Create App](https://mintcdn.com/stackone-60/i0kcvb_VY8ptwUMB/connectors/microsoftteams/images/oauth2-setup-teams-dev-create-app.png?fit=max\&auto=format\&n=i0kcvb_VY8ptwUMB\&q=85\&s=c670ac4503c34e3b288bbe6b39966a50)

**2. Fill in the basic information**

On the app **Dashboard**, go to **Basic information** under **Configure** in the left sidebar and fill in the following fields:

<ul>
  <li>**Short description**: Short summary of your app</li>
  <li>**Long description**: Full description of your app</li>
  <li>**Version**: Your app's version number</li>
  <li>**Developer or company name**: Your company's name</li>
  <li>**Website**: Link to your company's website (HTTPS)</li>
  <li>**Privacy policy**: Link to your privacy policy</li>
  <li>**Terms of use**: Link to your terms of use</li>
  <li>**Application (client) ID**: The **Application (client) ID** from your Azure app registration</li>
  <li>**Microsoft Partner ID**: Leave blank unless you have a Microsoft Partner Network ID</li>
  <li>Click **Save** to save your changes.</li>
</ul>

![Fill App Details](https://mintcdn.com/stackone-60/i0kcvb_VY8ptwUMB/connectors/microsoftteams/images/oauth2-setup-app-basic-info.png?fit=max\&auto=format\&n=i0kcvb_VY8ptwUMB\&q=85\&s=fb5c2b25b61b4dcee0b8df886a63aac2)

**3. Turn on the bot feature**

In the left sidebar, go to **App features** > **Bot**.

<ul>
  <li>Under **Identify your bot**, select **Enter a bot ID**.</li>
  <li>Paste your **Application (client) ID** in the bot ID field.</li>
  <li>Uncheck all other options (Upload files, Notification only, Calling, Video).</li>
  <li>Set scopes to **Personal**, **Team**, and **Group Chat**.</li>
</ul>

![Configure App Feature Bot](https://mintcdn.com/stackone-60/i0kcvb_VY8ptwUMB/connectors/microsoftteams/images/oauth2-setup-app-feature-bot.png?fit=max\&auto=format\&n=i0kcvb_VY8ptwUMB\&q=85\&s=9009855d213a49629728711bb9195fd3)

**4. Open the app manifest**

In the left sidebar, go to **App package editor**.

<ul>
  <li>Click `manifest.json`.</li>
</ul>

![Navigate To Manifest](https://mintcdn.com/stackone-60/i0kcvb_VY8ptwUMB/connectors/microsoftteams/images/oauth2-setup-navigate-to-manifest.png?fit=max\&auto=format\&n=i0kcvb_VY8ptwUMB\&q=85\&s=cc133d72d4c39a4f0083c73ccae12c4d)

**5. Add the channel features setting**

From manifest v1.25, an app whose bot uses the **Team** scope must declare channel feature support.

<ul>
  <li>Add `"supportsChannelFeatures": "tier1"` at the top level of the manifest.</li>
  <li>Click **Save**.</li>
  <li>Reopen `manifest.json` and check the line is still there.</li>
</ul>

**6. Update the app package**

After saving, an **Update** button appears in the App package editor with a warning that changes have been saved locally but not yet updated in the app package. Click **Update** to validate and apply your changes.

<ul>
  <li>**color.png** (optional): Your full-color icon for the Teams app catalog, 192x192 pixels</li>
  <li>**outline.png** (optional): Your transparent outline icon for the Teams app bar, 32x32 pixels</li>
</ul>

![Update Manifest Button](https://mintcdn.com/stackone-60/i0kcvb_VY8ptwUMB/connectors/microsoftteams/images/oauth2-setup-update-manifest-button.png?fit=max\&auto=format\&n=i0kcvb_VY8ptwUMB\&q=85\&s=7bb8f44f370aa215ad39232a509e7bf1)

## Publish the bot app

Publish to your org for testing or when bot users are in the same tenant as the app registration. Publish to the Teams Store for production use when bot users are in different tenants.

**1. Publish the app**

In the Developer Portal, expand **Publish** in the left sidebar.

<ul>
  <li>Click **Publish to org**.</li>
  <li>Click **Get started** to open the **Distribute your app** popup.</li>
  <li>**Your org (testing / single tenant):** Select **Publish to your organisation**.</li>
  <li>**Teams Store (production / multi-tenant):** Select **Publish to the Teams Store**, complete the App submission checklist and submit it for Microsoft review. After approval, the app is in every tenant's app catalog automatically.</li>
</ul>

![Publish to Your Org](https://mintcdn.com/stackone-60/i0kcvb_VY8ptwUMB/connectors/microsoftteams/images/oauth2-setup-publish-to-org.png?fit=max\&auto=format\&n=i0kcvb_VY8ptwUMB\&q=85\&s=b71b6c67151452823f4758ae76b5acba)

**2. Copy the Teams App Catalog ID**

Go to the [Teams Admin Center](https://admin.teams.microsoft.com).

<ul>
  <li>In the left sidebar, expand **Teams apps**.</li>
  <li>Click **Manage apps**.</li>
  <li>**Your org:** Find and approve the published app, then copy its **App ID** to **Teams App Catalog ID** in your Connector Profile.</li>
  <li>**Teams Store:** Copy the app's **App ID** to **Teams App Catalog ID** in your Connector Profile. It is the **global Teams App Catalog ID** that works across all tenants.</li>
</ul>

![Approve App](https://mintcdn.com/stackone-60/i0kcvb_VY8ptwUMB/connectors/microsoftteams/images/oauth2-setup-find-app-catalog-id.png?fit=max\&auto=format\&n=i0kcvb_VY8ptwUMB\&q=85\&s=fa341aa4e0bd0871274557ac085cae76)

## Find your Bot Service URL

The **Bot Service URL** is the endpoint your bot uses to send messages to Teams.

**1. Enter the Bot Service URL**

Enter `https://smba.trafficmanager.net/teams` in your Connector Profile, which works for most commercial tenants. Government and sovereign clouds use a different URL, listed in the [Microsoft docs](https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/conversations/send-proactive-messages?tabs=dotnet#create-the-conversation).

## Find your Tenant ID (single-tenant bots only)

The Tenant ID identifies your Microsoft Entra directory. Fill it in only if the Azure Bot resource was created as a **single-tenant** bot. Leave **Tenant ID** blank for a multi-tenant bot, which gets its Bot Framework token from the shared `botframework.com` endpoint.

**1. Navigate to Your App Registration**

Sign in to the [Azure Portal](https://portal.azure.com).

<ul>
  <li>Search for **Microsoft Entra ID** in the top search bar.</li>
  <li>Click **App registrations** in the left menu.</li>
  <li>Click on your app from the list.</li>
</ul>

**2. Copy Tenant ID**

On the app's **Overview** page, copy the **Directory (tenant) ID** to **Tenant ID** in your Connector Profile.

## Create the StackOne Connector Profile

**1. Create a Connector Profile**

Enable the connector and create a Connector Profile in your project. See [Setup Connector Profile](https://docs.stackone.com/gateway/quickstart.md#setup-connector-profile).

**2. Link an Account**

Once the Connector Profile is created, continue to [link an account](https://docs.stackone.com/connectors/microsoftteams/guides/link-account/oauth-2-0-bot-framework.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.