Chat Bot is not working - HTTPS internal server error - botframework

I have created a sample Echo bot for testing i've followed the given instructions in the MS tutorial site.
Created a web app service
Downloaded the MS bot framework v4 SDK - Echo Bot
Got the Publishing profile
Published the bot using visual studio
tested the chat bot When i test my bot in Test in Web Chat option in bot channels registration.
before that i tested in bot framework emulator, it was working fine as expected.
I checked the microsoft appid and password, it is all fine.
what am i missing to look on. can anyone please guide me.

Finally I've found the issue, though it a minor mistake. I wanted to update it here since many new Azure Bot users might do this mistake like me.
It was due to the option which i selected in while doing the app registration, After selecting the third option for Who can use this application or access this API?
It always good to select Multitenant option to make the bot to work for everyone.
If your requirement is restricted to one particular tenant then you should select the first option. But it is not in my case.
Accounts in any organizational directory (Any Azure AD directory -
Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)

Related

Microsoft Teams Bot not receiving messages

We have created a Bot through the Teams Dev Portal (https://dev.teams.microsoft.com/) and attached it to a Teams Tab app, but the bot is not receiving any messages from the Bot Framework. The Tab app was also created using the Teams Dev Portal and published to the Org app store. The same bot works fine if we test it on Bot Framework Portal (https://dev.botframework.com/). The bot is a http service hosted on AWS and registered in Azure AD.
We have a couple of other virtually identical bots created a few months ago that continue to work fine. Newly created bots seem to have this issue.
You need to configure the channel in azure Bot and add the app service.
please refer this link for further query.
https://www.sharepointeurope.com/step-by-step-configure-bot-to-work-in-teams-and-with-microsoft-graph/

Teams communication to custom https endoint

I would like to know how does Team communicate with a custom https endpoint.
I am developping a bot using Teams Toolkit and I am trying to understand what commands does teamsfx in order to successfuly side load app on Teams.
When trying to run the default command of "dev:teamsfx" and building the package using the correct ngrok enpoint and then uploading that package on Teams, the bot does not receive any messages through the "api/messages" endpoint.
However, when i run the deugging tool in VS Code, everything works fine and we pin pointed that the part that we are missing to add is found inside of these commands :
Teams Toolkit executed commands
So i have 2 questions :
Where can i find documentation regarding the tasks that Teams Toolkit is running so that we can manually execute those commands?
Why does Teams not reach our "api/messages" endpoint when we ONLY run "dev:teamsfx" ? (The appPackage is correct with the right manifest)
To answer your two questions:
The documentation about using Teams Toolkit to debug you app is here. You can read the documentation to know the details about what Teams Toolkit does for you after you press F5. For bot, Teams Toolkit will register and configure the bot, see here for more details.
When you run dev:teamsfx, the bot service will start. However, you have not configured the bot messaging endpoint, this is why Teams does not reach api/messages. When you press F5, Teams Toolkit will automatically start ngrok to forward the local bot traffic to a public url, then use this url to configure the bot messaging endpoint, e.g. https://0556-2404-f801-9000-1a-6fea-00-690.ngrok.io/api/messages. If you want to use your own tunnelling tool instead of the default ngrok, you can follow this doc. By the way, you can manage the bot (that Teams Toolkit has created for you) in Bot Framework developer portal, https://dev.botframework.com/bots.

Microsoft Bot Framework - bot missing from "Bot Framework" tenant. How to add?

Half a year ago we created a bot using the App Studio app from Teams. This worked well and the bot is running happily. Apparently starting 2022 App Studio "evolved":
So, this time using the new "evolved" Developer Portal, we registered a similar bot in another environment.
Just to end up with a bot that somehow is not registered in the Microsoft-internal bot framework tenant. I cannot say how we ended up in this state but there is a troubleshooting site that we can use to verify our failed state. The result of this simple call looks like this:
For googleability:
AADSTS700016: Application with identifier
'68dafaa0-5755-4433-8f47-3e174c5ed131' was not found in the directory
'Bot Framework'. This can happen if the application has not been
installed by the administrator of the tenant or consented to by any
user in the tenant. You may have sent your authentication request to
the wrong tenant.
Now the question: how can we add our bot to this "Bot Framework" tenant? And: which of the button clicks in the Dev Center and/or Bot Framework portal do the magic of adding the bot? The troubleshooting article unfortunately gives no advice on how to fix this situation.
We also tried removing the bot via the Bot Framework portal and re-created it with the same IDs and had the hope this fixes the situation. Unfortunately not.
Note: everything else is in place and looks like our other functioning bot. A teams app containing the bot, the Azure AD app registration with the bot ID, the bot in the bot portal, correct client secret. Everything seems correct except that the bot ID is missing from the Bot Framework tenant.
Just ran into the same issue. It looks like you have your bot registered into your tenant (and not the global bot framework). So you can get the access token by changing the URL to the following (replacing with your tenant id):
https://login.microsoftonline.com/YOUR-TENANT-ID/oauth2/v2.0/token
Just tested this and was able to get an access token. Now will that token actually work the same way using the scope is another matter. You may need to change the scope to:
https://graph.microsoft.com/.default
As of now I am getting a token either way
To generate a bot directly into the global tenant you can go to the following URL and click on "My Bots" and then "Create". Any existing bots you have should also appear here:
https://dev.botframework.com/

Teams channel in Azure Bot Service not working

I created an Azure Bot Service. When I test the service using "Test in Web Chat" it works as expected. When I add the Web Chat channel and use the Web Chat URL, it works as expected.
However, when I add the Microsoft Teams channel, it does not work as I expected. The Health Status shows "Healthy" (in "Channels (Preview)") and "Running" (in "Channels"). When I select "Open in Teams", I am redirected to Teams, but I do not see the bot as a user/bot I can chat with. I watched a video showing just that behavior as I was expecting, but the link only opens my Teams. I only have one other user in Teams and that user shows up. No sign of the bot. What am I missing?
I tried using the "Get bot embed codes". I put in the URL for the Mstreams href and instead of sending me to the bot user as I expected, I am redirected to the other user on the account (not the bot). What am I missing?
I've tried this using the "Channels" and the "Channels (Preview)" sections with the same results.
If relevant, I am still in the trial period with Azure and have not upgraded, but nothing says this should be an issue.
From all I can tell, I'm logging into the Azure portal and the Bot Framework portal with the same account as my Teams account. I'm using latest updated version of Chrome.
I don't think free account has anything to do with this. But the fact that the " bot embed codes" lead you to a different user, may be a configuration issue. Read Create a bot and Test and debug your Microsoft Teams bot in the Microsoft Teams documents for more information.
If you have successfully deployed to teams channel (teams channel registration), as per docs Copy the https part of the code that is shown in the Get bot embed code dialog.
For example, https://teams.microsoft.com/l/chat/0/0?users=28:b8a22302e-9303-4e54-b348-343232
In the browser, paste this address and then choose the Microsoft Teams app (client or web) that you use to add the bot to Teams. You should be able to see the bot listed as a contact that you can send messages to and receives messages from in Microsoft Teams.
Alternately, In-order to test them in teams you need to take the app id from the Configuration page of the bot.
Once you search with the app ID in teams you would be able to see this bot as a contact in Microsoft Teams.
Refer:
Create a Teams app package and upload your app to the Teams client for testing. Learn how
Publish your bot as a Line of Business app in your organization's Teams Tenant App Catalog. Learn how
Publish your bot as an app in the Teams App store. Learn how
I think I have found the answer, though I'm still trying to retrace my steps to make sure this is accurate. I will update here if I find anything more of value.
Despite little/no documentation to this effect, bots apparently do not work in the free version of Teams. You have to at least:
create a developer version of Microsoft O365 (E5 license) (and go through all the rigamarole to get it setup properly)
add at least one more user to the organization
then open Teams
Then, I used the embed URL to get the bot to show up. (Again, the same process did not work with my free Teams account even with another user added to it).
For the record, I didn't need to change any admin settings once the three items above were completed.

Cortana Skill only works for developer account that created it

I built a bot in bot framework and provisioned it across Teams, in addition to the default of Skype and Web.
Then, I turned on the Cortana skill, and it worked for me for that channel.
Now, when I add users in testing via the deploy to group option, although they are able to select "Join Group", they're not actually able to use the Skill.
I tried this myself on my machine, but with a new outlook account and Cortana failed to invoke the skill.
Is there something about the accounts I add to the group that I need to configure?
These same users are able to use other skills that have been publicly published in Cortana.
I have experienced the same condition. In the end I deleted the bot / skill and recreated it from the cortana dashboard (new skill) instead of directly via botframework dashboard - worked fine and group members could then access - strange as ultimately it ends up in the same place - perhaps it was more due to the recent updates on the MS sites.
I've recently worked on a Cortana Skill, and deployed to a group for testing. You do not need to configure anything else besides providing the emails in the 'Deploy to group' option.
This however, works for MSA accounts only. Make sure that other members of your group are using their live/outlook account.

Resources