Similar to Slack and MatterMost it would be nice to also offer Teams integration.
Plan:
- Initially, we explored using https://dev.teams.microsoft.com/apps, but found that this service is only available for work or school accounts.
- Subsequently, we considered utilizing the Bot Framework Rest API. However, due to the lack of clarity regarding bot installation, app access granting, and user authorization, we were unable to proceed further. Please refer to https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-api-reference?view=azure-bot-service-4.0 and https://learn.microsoft.com/en-us/microsoftteams/platform/bots/what-are-bots.
Progress:
- An app was registered in the Bot Framework Portal. Please see https://learn.microsoft.com/en-us/microsoftteams/platform/resources/bot-v3/bots-create and https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/teams-developer-portal.
- A Bot was registered as an Azure resource. Refer to https://learn.microsoft.com/en-us/azure/bot-service/abs-quickstart?view=azure-bot-service-4.0&tabs=userassigned.
- A handler was added, enabling connection to the web chat (Bot Framework Portal). For details, visit https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-quickstart?view=azure-bot-service-4.0.
- We successfully obtained an auth token via the Bot API using Azure credentials. See https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-authentication?view=azure-bot-service-4.0&tabs=multitenant#bot-to-connector.
Issues:
- The workflow for installing an App/Bot in Teams is unclear. The documented workflow appears to be designed for adding a bot chat within an internal organization or team account. View https://learn.microsoft.com/en-us/microsoft-copilot-studio/publication-add-bot-to-microsoft-teams.
- The OAuth2 process described in the documentation does not require user authorization. It seems to be aimed at authorizing the bot to connect to other services such as mail or calendar. Please refer to https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/authentication/add-authentication?tabs=dotnet%2Cdotnet-sample and https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-concept-authentication?view=azure-bot-service-4.0.
- The documentation is confusing and overwhelming, with numerous pages documenting various services that appear to accomplish the same tasks in different ways. Most guides are oriented towards using Microsoft products like VSCode or SDK.