SharePoint online connector fails with Microsoft Graph 404 error

I have been trying to set up Elasticsearch with a SharePoint integration.

I am hosting elasticsearch, kibana and enterprise-search all version 8.7 in docker container. I added Sharepoint Online as a Source for the enterprise-workplace-search. When I try to sync the content all sync jobs fail with the following error:
Error after less than a minute Updated 0 items Failure caused by: Connectors::ContentSources::Office365::CustomClient::ClientError: got a 404 from https://graph.microsoft.com/v1.0/groups/0177c34b-6360-47fc-a77b-67d69aa03c1c/sites/root with query {:$select=>"id,name"}

The 404 makes sense since no site exists with the specified group, but I don't understand why the connector is trying to find sites with random groups or why it completely stops after not finding one random SharePoint site.

Are there any tips or tricks which might point me in the right direction for solving this problem?

1 Like

Hi @ClemensW, this error usually happens when there's a group without a root site. The integration doesn't know whether a group has a root site, and then decides to query it. We have an open issue around this problem, but there are a few workarounds:

  1. You could add an empty root site for this group
  2. You could run our existing Sharepoint connector package, and modify it to return nil in this function: connectors-ruby/custom_client.rb at 8.3 · elastic/connectors-ruby · GitHub

We hope to have a better way for you to ingest your Sharepoint content in a future release.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.