0
votes

My bot is deployed to Azure's Bot Service, I enabled the Teams channel and I have successfully connected it to Teams. However, what I don't get is why it is working! :-)

When setting up the bot in Teams' "App Studio", the UI looks like the screenshot below. I don't use "Select from one of my existing bots", because the bot is deployed using a different user account. Instead, I paste just the AppId of the bot, using "Connect to a different bot id":

enter image description here

My questions are:

  • How does Teams know what the endpoint of the bot is? Is it calling a global (?) bot registry somewhere using the ID as a key?
  • Why does Teams not need the bot's password (when using the Bot Framework Emulator, app ID and password are required)?
    • If I set MicrosoftAppId and MicrosoftAppPassword to non-empty strings in appsettings.json and run the bot locally, I must provide these credentials when using the Bot Framework Emulator, otherwise a 401 is returned.
    • If the bot is deployed to Azure and I connect Teams to it, I never specify the password (see my screenshot) but only the app ID. Still, I can talk to the bot just fine through Teams.
    • If you know my app ID, you can use my bot...?
2

2 Answers

1
votes

[Me again :])

Have a look at my blog post on how bots work 'under the covers' - it will explain how the back and forward works, and how the Bot Framework Services provide this 'glue', so to speak.

0
votes

Answer to Question 1:  When webservice is hosted, a messaging endpoint gets generated, which routes through the bot service. Webservice needs App ID and Password from your bot registration to get connected with.  

Answer to Question 2: Teams enables one to create/register bot in teams for testing purpose and the scope of the bot lies within the teams channel Since it is not a hosted one.

Teams app package with your app manifest, that you will install and App ID provided in it connects the Teams client to your web service, routed through the Bot Service. Mainly, Teams app relies on App ID(unique Microsoft-generated identifier for app) to connect with your web service but not the password.

If you have registered a bot via the Microsoft Bot Framework,you should already have an ID. Otherwise, you should generate a new ID then reuse it when you add a bot.

Both APP ID and Password would be mandatorily used for certain purposes like authentication.