Is any API available to add a specific bot to the team's chat

lakshmi 751 Reputation points
2024-10-08T12:04:03.2266667+00:00

Hi Team,

We have a feature that allows initiating a chat with a Teams bot. In our scenario, the bot has never been used by the user before, and we only have the user’s email address, Microsoft App ID and password for the specific bot app.

Is it possible to initiate a chat with this specific bot from an Azure Function, considering that the users belong to multiple tenants. Or is there any teams API available to add the specific bot to the user's chat. We will have the direct link which can open the chat.

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
847 questions
Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,331 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,348 questions
{count} votes

Accepted answer
  1. Sina Salam 12,086 Reputation points
    2024-10-08T21:09:40.78+00:00

    Hello lakshmi,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you would like to know if any API available to add a specific bot to the team's chat.

    You can use the Microsoft Graph API to add a bot to a Teams chat. This involves using the teamsAppInstallation resource type to install the bot in a team or personal scope: https://learn.microsoft.com/en-us/microsoftteams/platform/bots/what-are-bots

    Also, to initiate a Chat with a Bot from Azure Function it is possible to initiate a chat with a specific bot from an Azure Function. You can use the Microsoft Bot Framework in conjunction with the Microsoft Graph API to send proactive messages to users, for more details and processes check: https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/conversations/channel-and-group-conversations and https://learn.microsoft.com/en-us/azure/bot-service/channel-connect-teams?view=azure-bot-service-4.0

    I hope this is helpful! Do not hesitate to let me know if you have any other questions.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.