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

Matthew Robinson 0 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: <this is the primary admin key assigned to my search service>

Body:

{

"name": "sharepoint-indexer",

"dataSourceName": "sharepoint-datasource",

"targetIndexName": "sharepoint-index",

"encryptionKey": {

"keyVaultKeyName": "SharepointIndexerKey",

  "keyVaultKeyVersion": <version of my the key in my keyvault>,

  "keyVaultUri": "<URI to my Keyvault>",

  "accessCredentials": {

    "applicationId": "3a2ab40b-f942-4b1e-8bf3-e9c5f79bb24f",

    "applicationSecret": <the **value** of a secret associated with the above Entra app>

  }

}

}

All the data sent with the API request seems to be fine, but I'm still getting an error. Any ideas what the issue might be?

Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
250 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Matthew Robinson 0 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.