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?