question

AmitThakkar-9832 avatar image
0 Votes"
AmitThakkar-9832 asked ·

Add SharePoint Document URL to QnAMaker - Cognitive Service Knowledge Base using API

It is allowed to add a SharePoint Document URL to Cognitive Service URL as per this article which works fine when we add URL manually from the portal.

However, if we use the Knowledgebase - Update API, it works fine to add a new anonymous URL to the existing knowledge base. But, if we try adding a URL to SharePoint Document with the same method, it does not work.

Request Payload is as below:

 {
   "add": {
     "urls": [
       "https://<tenant-name>.sharepoint.com/Shared%20Documents/sample.docx"
     ],
      "qnaList": []
   },
   "delete": {},
   "update": {},
   "name": "SampleQnA"
 }

Response Payload is as below, but URL is not added to the Knowledge Base:

 {
   "operationState": "NotStarted",
   "createdTimestamp": "2020-06-02T13:12:13.1640525Z",
   "lastActionTimestamp": "2020-06-02T13:12:13.1640525Z",
   "userId": "7fca1258ffc8455ea10a47e4d4ccdf51",
   "operationId": "7a21036d-4a61-43db-a3db-7592b2cae3b0"
 }

Appreciate any help on this, Thanks in advance.



azure-cognitive-services
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

GiftA-MSFT avatar image
0 Votes"
GiftA-MSFT answered ·

Adding SharePoint URLs through API is currently not supported by QnAMaker. If your application using the APIs to do QnAMaker operations has the permission to the SharePoint document, you may download the SharePoint document on the client side and use the UpdateKB/CreateKB API with the document. QnAMaker portal works in the similar way - asks permissions for SharePoint, accesses the document on client side, and uses the UpdateKB/CreateKB API in a similar way. Please refer to the following document for more details.


· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for the feedback.

0 Votes 0 ·