I want to try the demo on Add authentication to your bot via Azure Bot Service which based on the document https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-tutorial-authentication?view=azure-bot-service-3.0, what i am using is Demonstrates OAuthCard support in the v3 C# SDK, using AAD v2, but i always failed when i use bot emulator to connect the bot service.
i think i set the correct the settings in the webconfig.
Related
I'm trying to understand the difference between a bot service registration & application registration in Azure.
I'd assumed that a bot registration was all that was required (to get the app id & secret) to test out a bot, but then came across the following guide for setting up a teams app that used a bot which instructs you to also create an application registration that's linked to the bot registration.
What is the application registration for?
If you're developing a consumer / skill bot setup do you need an application registration for all the bots or just the skill consumer?
Thanks in advance.
So technically you require both, but you're correct that doing a normal bot registration in the Azure portal (I say normal because there are other ways than the portal, for instance, like ARM templates, etc.) will create an App Registration as well. You need to go to the app registration to get your app password (also called app secret).
You can choose to go another route, like creating an app registration first, and then using that when you create your bot, and there are reasons why you might like to do that, but if you don't have a specific reason, just go the normal route.
Incidentally, be aware of the difference when creating your bot between a "Bot Channels" registration and a "Web App Bot" - both will give you a bot registered with the Bot serviced, but the "Web App" bot also includes an Azure "Web app" that you can use to host your bot (whereas Bot Channels gives you more freedom in how you want to host your bot, for instance as an Azure Function or even outside of Azure altogether).
Bot service registration refers to registering a bot with the Azure Bot Service (as your bot does not have to be hosted on Azure).
App registration refers your bot security configuration. You set this up when you click on to the "App ID and password" field during setup.
There is some other Azure Bot Service documentation which goes into this in more detail:
Bot channels registration
Troubleshooting Bot Framework authentication
Create a bot with Azure Bot Service
I am struggling to get my teams bot to work with my azure app service with Authentication enabled.
Here is my setup:
I have a teams bot that reacts to some events in the team. I also have an azure web app that has an endpoint /api/messages that listens to bot messages. There is an Azure Bot Channels Registration that wires those two together.
It all works fine until I enable EasyAuth in my web app to authenticate with Azure AD (I need this because there are other endpoints in this web app that need to be secured). With authentication in web app enabled, bot messages do not reach the web app, and I cannot find any errors in logs either.
I tried to add different OAuth Connection Settings in my Bot Channels Registration, and also Allowed Token Audiences in auth settings in web app, but I haven't found a setup that works yet.
Could someone please tell me how this should be configured? Thank you in advance.
please refer to Azure App Service Authentication / Authorization (Easy Auth) guidance: https://github.com/cgillum/easyauth
The admin API setting: https://github.com/cgillum/easyauth/wiki
Advanced Application Settings: https://github.com/cgillum/easyauth/wiki/Advanced-Application-Settings
If you need more details, I would highly suggest you go through the official document: https://learn.microsoft.com/en-us/azure/app-service/overview-authentication-authorization
I created chatbot with microsoft bot framework v3.
I use mssql server 2017 database.
It runs perfectly on emulator. After that I registered my chatbot on azure through Bot channel registration.
Then I save AppId and Password etc in web.config and also in emulator and tested, It runs without any error.
I use ngrok , as ngrok http 3979 it gives me https://........ngrok.io and I save that access point in azure bot reg endpoint with api/messages.
Then I get embed code with key and placed in page.html and when I send message it gives me error as:
Yes I'm using webchat and here the screenshots
webconfig and running emulator
ngrok http 3979 and also save it azure settings as endpoint
When run django app, say hi
I’ve created a QnA Service using qnamaker.ai and when I proceed further to create a bot using the Bot Service, I cannot because the upon searching there’s no option like Bot Service (Preview) as mentioned in the tutorials. Instead I’m presented with the following:
• Web App Bot
• Functions Bot
• Bot Channels Registration
On Azure, there are 3 services related to Bot:
Web App Bot
Functions Bot
Bot Channels Registration
Web App Bot and Function Bot are both part of Bot Service:
Bot Service provides the core components for creating bots, including
the Bot Builder SDK for developing bots and the Bot Framework for
connecting bots to channels.
Simply put, Bot Service will host a Web App / Functions Bot in Azure and let you config channels or edit the code online.
Bot Channels Registration is for projects where the developer creates their own web app project based on Bot Builder SDK and deploy the web app to Azure/AWS/Google Cloud Platform. In Azure's Bot Channels Registration, the developer can link their web app's url to Azure and enable channels to communicate to their bot. In summary, this scenario enable more flexiblity in development and hosting.
In your case, you can create a Web App / Functions Bot use QnA Bot template. Once created, in Application Settings > under App settings > Find QnAKnowledgebaseId & QnASubscriptionKey,
replace the two fields from the information in QnA service.
Save the update and your Bot should use the QnA service you published.
When I test my chat bot on the bot registration page I am getting a "MethodNotAllowed" error
The page you are looking for cannot be displayed because an invalid
method (HTTP verb) is being used.
The bot is published as azure app service, and was working fine in the emulator using the bots appid and password.
As it's stated in Bot Framework documention
Your bot communicates to the Bot Connector Service using HTTP over a
secured channel (SSL/TLS)
So please make sure you are using HTTPS instead of HTTP, and if url is properly set in dev portal.