Unable to test in microsoft chat bot registration - botframework

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.

Related

How to implement OAuth flow in Bot without using OAuthPrompt Dialog for unsupported channels such as Zoom and WebEx

I have an existing bot code that uses OAuthPrompt dialog that I would like to deploy for Zoom and WebEx that are not supported by Azure Bot Service. As per the documentation and sample code, I have used the adapter for supporting those channels. It works fine. But it does not support OAuthPrompt Dialog, it returns "OAuthPrompt.BeginDialog(): not supported by the current adapter".
When I debugged with the source code (Bot builder SDK /w Adapter), Implementation of OAuthPrompt dialog checks whether adapter implements IExtendedUserTokenProvider interface, currently it is not, so it returns error. How to add OAuth card support without using OAuthPrompt Dialog/Azure Bot Service?
This question is similar to mine:
(Is there any way to use authentication service without azure bot service?)
Following are my thoughts:
Directly send a request to identity provider with redirect URL (my bot endpoint) for OAuth2 code flow. Also update the redirect URI in the App Registration portal with bot endpoint, currently I have provided Redirect URI as "https://token.botframework.com/.auth/web/redirect" for supported channels.
Implement the IExtendedUserTokenProvider in the adapter (similar to Emulator).
Any feedback is appreciated.
I can get it working by having customized OAuthPrompt dialog for Zoom, implementing IExtendedUserTokenProvider in ZoomAdapter (ZoomAdapterWIthErrorHandler). OAuth connection settings (such as identity server endpoint, scopes, redirect uri} are stored in the appSettings.json for the connection name. Supported channels (MS Teams and Slack) will use the SDK provided implementation (OAuthPrompt Dialog) with settings from ConnectionName configured in the Azure, unsupported channels will get the settings from the AppSettings.json file. GetSignInResourceAsync() should have the right implementation that returns the sign-in resource Uri.

Bot authentication with azure app service EasyAuth

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

Microsoft bot framework v3 webchat channel not working with ngrok

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

Endpoint URL has an invalid value

I am trying to register my Bot at https://dev.botframework.com
However, when I put https://localhost:44338/api/messages in the
Messaging endpoint field I get an error - Endpoint URL has an invalid
value. My bot is running locally on https://localhost:44338.
Also is there any way I can create my own web client which can
communicate with my Bot.
Is Bot Registration mandatory for it to be deployed in production.
It looks like you're trying to register your bot with your local instance whereas you need to use a deployed (production) instance.
Publish your bot to Azure and use the URL you get from that. In Visual Studio you can right click your project and select "Publish"- just follow the instructions from there.
You can make your own client, yes. You can use your browser or anything else to make HTTP requests to your production bot.
You need to register your bot if you're using the bot connector.
Hope that helps.

Microsoft Bot Framework bot not working in Microsoft Teams when using ngrok

My Bot is working in the Emulator and through other channels but it's not working on Microsoft Teams.
I able to see other channels requests and responses statuss in ngrok. But when using Microsoft Teams, request are not even hitting my server URL (ngrok).
App ID :dfc6ac0d-e805-4a40-9fd3-7c4678b7ae88
(It's not duplicate of Unable to use bot from Teams)
Hello: I was able to access the Bot and get a response (character count of my message.) Perhaps you didn't enable sideloading of bots in the Office Admin Portal? https://msdn.microsoft.com/en-us/microsoft-teams/setup

Resources