First, download the Cognitive Search API - SharePoint Data Source.json
file and import it into your Postman. Then, in the Variables section of your imported collection, setup the following variables:
AZURE_SEARCH_SERVICE_NAME
- Your Azure Cognitive Search Service Name. You can retreive it from the URL. It goes between https:// and .search.windows.net: https://clever-cognitive-search.search.windows.netAZURE_SEARCH_ADMIN_KEY
- Cognitive Search Admin keyAZURE_APPLICATION_ID
- Azure App Registration ID. Note: The app must have read access to your SharePoint tenantAZURE_APPLICATION_SECRET
- Azure App Registration Secret.AZURE_TENANT_ID
- Azure Active Directory Tenant ID. The same that hosts Cognitive Search and SharePoint.SHAREPOINT_SITE_URL
- Full URL of a SharePoint site. For example, https://gocleverpointcom.sharepoint.com/sites/Teailspin-Records-CognitiveSearchDemoSHAREPOINT_LIBRARY_URL
- Full URL of a document library. For example, https://gocleverpointcom.sharepoint.com/sites/Teailspin-Records-CognitiveSearchDemo/Shared Documents/Forms/AllItems.aspxSHAREPOINT_ADDITIONAL_COLUMNS
- Custom SharePoint columns that you want to index. For example: Title,Year,DocumentType,Critical,LastReviewed,DocumentOwner,AnnualCosts,FullFilePath
Hi @DevangZala. My best guess is that you need to specify SHAREPOINT_ADDITIONAL_COLUMNS or
additionalColumns
https://learn.microsoft.com/en-us/azure/search/search-howto-index-sharepoint-online
additionalColumns
Example 1 (additionalColumns=MyCustomColumn,MyCustomColumn2):
"container" : { "name" : "useQuery", "query" : "includeLibrary=https://mycompany.sharepoint.com/mysite/MyDocumentLibrary;additionalColumns=MyCustomColumn,MyCustomColumn2" }
Example 2 (escape characters using double backslash):
"container" : { "name" : "useQuery", "query" : "includeLibrary=https://mycompany.sharepoint.com/teams/mysite/MyDocumentLibrary/Forms/AllItems.aspx;additionalColumns=MyCustomColumnWith\\,,MyCustomColumnWith\\;" }
This needs to be done in the SharePoint DataSource creation:
https://{{AZURE_SEARCH_SERVICE_NAME}}.search.windows.net/datasources?api-version=2021-04-30-Preview
Body