MS Teams bot: Is serviceUrl Bot specific or team/channel/user specific?

Sumant Pangotra 6 Reputation points

I am building a MS teams bot to send proactive notifications to channels in a team or maybe multiple teams. I have an understanding that serviceUrl required to send messages to channel needs to captured beforehand.

I wanted to know if the serviceURL needs to be captured per team/channel/user (user for 1:1 conversation.) or is it bot specific and once captured can be used for any team/channel/user ?

Also in my case my bot may never receive any chat event to capture serviceUrl as it will be one way notification system.

Azure Bot Service
Azure Bot Service
An Azure service that provides an integrated environment for bot development.
543 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Steven Kanberg 16 Reputation points

    The serviceUrl is channel specific, not user, bot, or team. So, for example, Direct Line would be ""; Slack would be ""; and, so on. You can reference a small bit of information here.

    As for sending proactive messages, I would recommend you read over the BotFramework docs on the topic, the Teams docs, as well as review the samples available in the BotBuilder-Samples repo under Advance bots (#16).

  2. Jonathan Cardy 0 Reputation points

    Even when the bot is a one-way notification bot, you still receive notifications such as installation, user added, etc. This is the opportunity to save the serviceUrl.

    It still isn't clear to me whether a serviceUrl should be saved per-user e.g. when sending user direct chat messages (since a team/channel is not involved).

    No comments