Issue when trying to add Microsoft QNA Maker Bot in Sharepoint - azure

I have followed the process to create a QNA Maker Web App Bot in Azure that works when I use the Test in Web Chat function. When I try to add the details of the Web Channel into a Webpart Embed area I get the following error
"We can't show this embedded content because the code seems to be incomplete. Make sure that the embed code includes width, height and a valid address for the src attribute."
I have tried two different ways of entering the iframe details and they both come up with the same error.
This is the code that is produced within the bot for the Web Channel

Related

How can I show a private picture from SharePoint in my Teams Chatbot based on Azure QnAMaker?

I am trying to make a chatbot that will be channeled to Teams using the Azure QnA Maker/ MS botframework. I would like to use pictures in some of my Q&A's that are stored in a SharePoint folder.
As a test I have added a Q&A with the same picture twice: once from private SP and once from the internet.The account I use has access to the said SharePoint and I can add both pictures just fine in the qnamaker.ai portal with the markdown below.(It also works fine in the test mode of the portal itself)
SP\n\n![SP](**link of SP website**/Shared%20Documents/squirrel.jpg)\n\nInternet\n\n![pic1](https://images.unsplash.com/photo-1507666405895-422eee7d517f?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80)
My QnA Maker is currently channeled to Teams, and that is where the problem happens; the private picture seems inaccessible. I am accessing Teams from an account that also as access to the SharePoint.
QnAMakerTeamsIssue
How can I make my Teams app read the private SharePoint image?
I'm pretty sure Teams actually caches the images in it's own CDN, so it needs to "pre-fetch" them, so to speak. As a result, it needs to have public anonymous access to the content. This is not possible by default with SharePoint, so you'd need to:
put the content somewhere else
I haven't tested this, but it might be possible to utilise the CDN capabilities of SharePoint. It needs admin control, but perhaps there's a one-off location you could use for this. See more here
Update: I did more research, but unfortunately the SharePoint CDN can't be used for this as it is configured to only accept requests from SharePoint pages themselves (i.e. the content can't be used outside of SharePoint). I created a uservoice request for this, in case others want to up-vote it.

How to configure Microsoft Healthbot?

I'm working on a project to integrate a healthcare assistant bot on a mobile application with React Native
I saw that there was a bot from Microsoft for health and therefore adapted for my project, so I would like to use it
So I created an account on Azure and created my bot, however I can't and don't really understand how to configure it to use it and integrate it into my project.
On the Microsoft documentation I see that we have to configure the DirectLine to use a Microsoft bot but I can't activate this on mine, I don't have the option, moreover it's considered as a Saas and not as a bot application on azure, so I don't have the same options and I don't really understand exactly why (I tried with the cli without success, so I think we can't configure DirectLine on a HealthBot)
Then I found this https://github.com/Microsoft/HealthBotContainerSample/tree/live_agent_handoff
The README.md indicates that we must deploy the bot, which I did, I also set the variables to add. But then I don't know exactly what to do to integrate that into my application. I also wonder how to take into account the creation of scenarios on azure.
If someone could enlighten me on how I should proceed to integrate this, I would be grateful. I also saw that there was a module (react-gifted-chat) for creating chat bot, but in the tutorials I meet, everyone uses the DirectLine, so I wonder if it's possible or do I have to go through a Web View?
Thank you in advance!
Microsoft has a doc, titled “Embed a health bot instance in your application”, that should answer your questions. You can find the doc here.
It includes:
GitHub samples
Code examples
Steps for securing communication
Information on how to setup Direct Line
A link and steps for setting up WebChat as an iframe or web page element (in a div, for example)
Hope of help!

Azure Bot Service Sample AuthenticationBot Sign-in card not working (application/vnd.microsoft.card.oauth)

I am following this tutorial using the v4 SDK.
Add authentication to your bot via Azure Bot Service
Put simply, I click on the "Sign In" button from the OAuthPrompt card, a window pops up with the title "Sign In" and the screen is blank. This is using the bot service emulator.
I could be wrong but I feel like it's something to do with the content type.
application/vnd.microsoft.card.oauth
I wish I had more information to offer.
From the samples, I get the same outcome whether I use the BotAuthenticationMSGraph or AuthenticationBot example.
Thanks for the assistance. I've managed to progress but am not fully over the line yet. Maybe it's clearer for others, but for me, I followed what I thought were the instructions and did this:
Create Azure AD v2 Application (apps.dev.microsoft.com)
Create BOT Registration (Azure Portal)
... but in step 1. above, it automatically creates the app for you when you create the "Bot Channels Registration" so step 2 of creating the application is not required I created a second app and used that one in my settings and I think that's where I was going wrong.
Thanks for your help.
On another note, once the above was corrected and I removed myself from the company Wifi, it all came good. Network blocking issue!

QnA Maker - Azure Bot Service - Test in Web Chat not respondng

First, new to creating Bots so please be patient.
I created a KB using QnAMaker. Created new Bot in Azure Bot Service. New bot was created using Template for QnA. Followed the steps below per documentation:
In Azure portal, open the newly created Web App Bot resource.
Click on "Application Settings" and in the App Settings list, add QnASubscriptionKey and QnAKnowledgebaseId. The corresponding values can be obtained from the KB Settings page in http://qnamaker.ai.
The QnAMaker-enabled Azure bot service app is now ready to use. To try it out click on "Test in Web Chat" to chat with your QnA bot.
Test in Web Chat does not respond
Also created new App, using Basic template. Made to other updates. Test in We Chat does send a response.
Again, new to the process but have read a great deal of documentation but nothing that speaks to this issue specifically. Any help would be greatly appreciated.
I created a QnAMaker bot this weekend with Bot Service. The documentation is a little confusing at the moment, although Microsoft generally refines it over time until it's quite good. Here's what I did to get this going.
Provisioned a QnAMaker service at qnamaker.ai. I created a knowledge base, saved and retrained, and published. To make sure everything is good on the QnAMaker service, go to the Test tab (https://qnamaker.ai/Edit/Test?kbId=:your-service-id to make sure you can chat with it and it responds as expected.
Created a new Web App bot by going to the portal, clicking "Create a resource", choosing "AI + Cognitive Services", then "Web App Bot".
When entering the Web App Bot settings, I made sure to choose a Basic C# bot, and chose the "Question and Answer".
Once you provision the Web App Bot service, you'll also have a Web App provisioned as well. You'll need to create a web application that will answer requests from the web, hand them to your QnAMaker service, and return the results. Navigate to your Web App Bot service, then choose the Build menu option under Bot Management. Then Download the zip file containing your starter code.
Open the starter code. You'll need to add some keys to your web.config file. Make sure that you have keys for the following, and that they're populated: MicrosoftAppId, MicrosoftAppPassword, QnaSubscriptionKey, QnAKnowledgebaseId, and AzureWebJobsStorage. If memory serves, these values are read within the code, but there's no empty stubs in the web.config that prompts you to enter them. This was a little frustrating.
After updating web.config, publish the web app to your Azure Web App instance associated with your bot.
Now go back to your Web App Bot in the portal. Under Bot Management, go to the Settings page. You're going to need to enter in the Messaging endpoint so that your bot service knows where to send HTTP requests to your web app, which will in turn talk to your QnAMaker service. In this example project, your messaging endpoint should be https://[web app name].azurewebsites.net/api/messages.
NOW you're ready to Test in Web Chat. Everything should link up then.
I had this issue just now. It was caused by having extraneous data at the end of my QNA service key, something like (format=json) which somehow ended up after the key. I suggest you re-copy and paste the knowledgebase id and key into the fields and make sure they are the correct length with no garbage.
Apart from not returning responses it gave no other clue as to what might be wrong.

Impossible to choose any channel in Azure Bot Service

Since the new Azure Bot Service (released GA 2017-12-13), I've created a "WebAppBot" named "SanoBot" and I can't choose any channel to plug it for another services like Telegram: the page is empty when I click on "Channels". I've done a little screenshot to show you what I see:
I've check the documentation sent by the Azure Support from Twitter but the pages return 404 error.
Just to be clear: the bot works well and I can modify it from the Online Editor, build, deploy & test it. It's only "channels" feature that doesn't work.
Thanks for your help.
I can't use pictures because I haven't enough reputation...

Resources