Azure cognitive search not working on SharePoint subdirectory

Waleed Alfaris 1 Reputation point
2022-11-24T11:25:18.69+00:00

I have a SharePoint site which contains multiple folders. I would like to setup an Azure Cognitive Search Index on only one of the subfolders within this site. Creation of the datasource works without error. However, whenever I go to create the indexer, I get the error with link and code to authenticate, perform authentication, and then get the error "Error with data source: SharePoint site 'https://{domain}.sharepoint.com/sites/{site}/Shared%20Documents/{subfolder}/Forms/AllItems.aspx' not found. Please adjust your data source definition in order to proceed."

I have tried creating the datasource with query includeLibrariesInSite and includeLibrary as well as tried the connection string with and without the Forms/AllItems.aspx. I am able to create the datasource and indexer on the entire site, but not on a specific folder withing the site.

Is this even possible? If so, how can I acheive this?

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
862 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 20,626 Reputation points
    2022-11-28T16:18:18.353+00:00

    Thanks for reply! Folder filtering is not a feature of the Indexer, only the options listed in the below document link are supported: https://learn.microsoft.com/en-us/azure/search/search-howto-index-sharepoint-online

    If you needs to be able to filter on specific folders, perhaps you can add a custom column as part of the documents in SharePoint on creation (with an automated workflow or similar) and then after indexing, filter (https://learn.microsoft.com/en-us/azure/search/search-filters) that column when querying for documents, so only the ones that are under a specific folder are returned.

    0 comments No comments