How to programmatically open a chat window in the MS Teams desktop app?

Koala Huynh 25 Reputation points
2025-03-07T10:47:00.6733333+00:00

I'm implementing an MS Teams chat bot using the Microsoft Bot Framework, and I need to send direct messages between users on behalf of the logged-in user. The chat windows should open as pop-ups. The bot service is self-hosted.

Scenario:

  1. A Teams user selects a list of other Teams users from an Adaptive Card sent by the bot.
  2. When they click "Complete", the bot should:
  • Initiate direct chat messages between the logged-in user and the unchecked users.
    • Automatically pop up the private chat windows so the user can follow with the sent messages.

Question:

Is there a way to programmatically open chat windows in the MS Teams desktop app when sending messages?

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,638 questions
0 comments No comments
{count} votes

Accepted answer
  1. Prasad-MSFT 8,611 Reputation points Microsoft External Staff
    2025-03-07T12:01:36.4666667+00:00

    Unfortunately, as of now, there is no direct way to programmatically open chat windows in the Microsoft Teams desktop app when sending messages. The Microsoft Teams API and Bot Framework do not provide a method to force the Teams client to open a chat window automatically.

    However, you can achieve part of your scenario by sending proactive messages to users and providing deep links that users can click to open the chat windows themselves.

    Thanks, 

    Prasad Das

    ************************************************************************* 

    If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.

    0 comments No comments

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.