I'm getting an error when attempting to create an Indexer for Sharepoint Online Indexer

Matthew Robinson 20 Reputation points
2025-03-09T15:45:51.9466667+00:00

I'm getting the following error when attempting to create an Indexer for Sharepoint Online Indexer:

"Error with data source: A configuration issue is preventing authentication - check the error message from the server for details. You can modify the configuration in the application registration portal. See https://aka.ms/msal-net-invalid-client for details. Original exception: AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app '3a2ab40b-f942-4b1e-8bf3-e9c5f79bb24f'. Trace ID: c217420b-24c1-4d5c-9291-ce6a4aab0f00 Correlation ID: 5257faf2-3c85-4bc2-a6ea-0342b1338399 Timestamp: 2025-03-09 15:10:15Z Please adjust your data source definition in order to proceed."

I'm using the following API endpoint: /indexers?api-version=2024-07-01

I've registered an app (in Entra) with id 3a2ab40b-f942-4b1e-8bf3-e9c5f79bb24f, and given the app a secret. I've also created a key in the keyvault.

I've successfully created a datasource (Sharepoint), and an Index.

The payload I'm sending to the endpoint is as follows.

Headers:

Content-Type: application/json
api-key:

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.
1,223 questions
0 comments No comments
{count} votes

Accepted answer
  1. Laxman Reddy Revuri 3,185 Reputation points Microsoft External Staff
    2025-03-10T03:57:53.94+00:00

    Hi @Matthew Robinson
    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer

    Ask: I'm getting an error when attempting to create an Indexer for Sharepoint Online Indexer
    Solution:

    I originally created my datasource with an early (preview) API version, rather than 2024-07-01, which I was using in an attempt to create my indexer.

    I recreated everything using ?api-version=2024-11-01-preview, and the error dissappeared.

    Btw, I think it's currently only possible to specify "sharepoint" as a datasource type if you're using a preview version of the API

     Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members. 

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Matthew Robinson 20 Reputation points
    2025-03-09T19:17:18.8833333+00:00

    Ok, I fixed this.

    Looks as though it was all my fault too :D

    I originally created my datasource with an early (preview) API version, rather than 2024-07-01, which I was using in an attempt to create my indexer.

    I recreated everything using ?api-version=2024-11-01-preview, and the error dissappeared.

    Btw, I think it's currently only possible to specify "sharepoint" as a datasource type if you're using a preview version of the API

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.