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

271 views Asked by At

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?

1

There are 1 answers

2
Hilton Giesenow On BEST ANSWER

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:

  1. put the content somewhere else
  2. 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.