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

Amit Thakkar 1 Reputation point

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": [  
     "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
Azure Cognitive Services
A group of Azure artificial intelligence services and cognitive APIs that help build intelligent apps.
946 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. GiftA-MSFT 11,096 Reputation points

    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.