How the bot service is able to send messages to different organization/tenant MS Teams users without getting any permissions from their admin/users??

Veera 1 Reputation point
2021-03-25T07:18:41.903+00:00

Hii,

I am building a bot service to send proactive messages to only Microsoft Teams users. I am following this (https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-quickstart?view=azure-bot-service-4.0) to send messages using REST API.

I want to know few things.

  1. I couldn't understand how the bot is able to send messages to different organization/tenant users without their consent. Doesn't the bot need any permission from users/admins to send messages?
  2. And I am able to send messages to different organization/tenant users with just one bot access token (till it expires). Doesn't need different access tokens for different organization/tenant users??
Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
745 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.
2,837 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Rama-MSFT 176 Reputation points
    2021-04-05T05:12:13.783+00:00

    Moving comments to answer section for better visibility.

    I think the AD tutorial details granting access by admin to the app for authentication scenario. In this case the bot connector service is used instead of actually authenticating users against an AD. So, Yes with respect to above question the bot framework is handling it internally.
    If you look at the process to setup authentication in a bot the process is actually registering the AD identity provider with the bot there by granting required access with consent.

    0 comments No comments