Skip to content

Teams connector: incompatibility with Single Tenant Azure Bot (Multi-tenant bot creation deprecated by Microsoft) #2018

@IonaGuyomarch

Description

@IonaGuyomarch

Summary

Since mid-2025, Microsoft has deprecated the creation of Multi-Tenant Azure Bots.
All new Azure Bots must now be created as Single Tenant or User-Assigned Managed Identity.
This makes the Tock Teams connector non-functional for any new bot setup.

Problem

The TokenHandler in the Teams connector requests an OAuth2 token using botframework.com
as the tenant:

POST https://login.microsoftonline.com/botframework.com/oauth2/v2.0/token

This works only for Multi-Tenant bots. For Single Tenant bots, the request must use
the specific Tenant ID instead:

POST https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token

As a result, all token requests fail with HTTP 401.

Steps to reproduce

  1. Create a new Azure Bot (only Single Tenant is available)
  2. Create an App Registration with the corresponding App ID and secret
  3. Configure the Teams connector in Tock Studio with the appId and password
  4. Send a message → no response, 401 error in logs:

WARN ai.tock.bot.connector.teams.TeamsClient - Microsoft Login Api Error : 401

Expected behavior

The Teams connector should support Single Tenant Azure Bots by allowing
the configuration of a tenantId parameter, used in the OAuth2 token request.

Environment

  • Tock version: 25.10.5
  • Connector: Teams
  • Azure Bot type: Single Tenant (Multi-tenant no longer available for new bots)
  • App Registration signInAudience: AzureADandPersonalMicrosoftAccount

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions