how to create indexer for cognitive search as it shows there is error with Sharepoint data source

Noothana Prasanna 5 Reputation points
2023-08-04T04:29:10.7366667+00:00
"Error with data source: SharePoint site 'https://smarttreeinc.sharepoint.com/sites/Regulatory/Shared%20Documents/Forms/AllItems.aspx' not found.  Please adjust your data source definition in order to proceed."

im trying to use sharepoint as data source for cognitive search using postman - json. i have created data source, created index, but when im trying to create indexer, its not happening. im directed to sign in get indexer status update and i use the code and i sign in, after which im getting the above error. Please help thank you

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.
741 questions
{count} vote

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 18,541 Reputation points
    2023-08-07T09:48:13.7666667+00:00

    @Noothana Prasanna Thanks for reaching here! It looks like you're trying to create an indexer for Cognitive Search using SharePoint as a data source, but you're encountering an error that says "SharePoint site not found". This error message suggests that the data source definition you provided in your indexer is incorrect or incomplete.

     Here are some steps you can take to troubleshoot this issue:

    • Double-check the URL of your SharePoint site. Make sure that the URL you provided in your data source definition matches the URL of your SharePoint site exactly, including any special characters or spaces.
    • For SharePoint indexing, the data source must have the following required properties:
    • name is the unique name of the data source within your search service.
    • type must be "sharepoint". This value is case-sensitive.
    • credentials provide the SharePoint endpoint and the Azure AD application (client) ID. An example SharePoint endpoint is https://microsoft.sharepoint.com/teams/MySharePointSite.
    • you can get the endpoint by navigating to the home page of your SharePoint site and copying the URL from the browser.
    • container specifies which document library to index.
    • Also, to create a data source, call Create Data Source using preview API version 2020-06-30-Preview or later.
    • Verify that you have the correct permissions to access the SharePoint site. Make sure that you have the necessary permissions to access the SharePoint site and its contents. 
    • If the SharePoint site is in the same tenant as the search service and system-assigned managed identity is enabled, TenantId doesn't have to be included in the connection string.
    • Try creating the indexer again. If you've verified that your SharePoint site URL is correct and that you have the necessary permissions, try creating the indexer again. You can use the REST API or the Azure portal to create and manage indexers.
    • See this official document link here for more details- https://learn.microsoft.com/en-us/azure/search/search-howto-index-sharepoint-online#step-4-create-data-source Let us know if further query or issue remains.