What type of issue is this?
Question
What SharePoint development model, framework, SDK or API is this about?
SharePoint REST API
Target SharePoint environment
SharePoint Online
What browser(s) / client(s) have you tested
Additional environment details
Request is done using Application Permissions.
Issue description
When executing SharePoint REST API requests to enumerate list items (in our case: getting the last item ID for a list/drive), sometimes we receive the following error:
Request (example):
GET https://<tenant>.sharepoint.com/sites/<site>/_api/web/lists/GetById('<list-guid>')/items?$orderby=Id desc&$select=Id&$top=1
Response:
Status: 500 Internal Server Error
ErrorCode: "-1, System.Configuration.ConfigurationErrorsException"
Error Message: "Exception has been thrown by the target of an invocation. (C:\\inetpub\\wwwroot\\wss\\VirtualDirectories\\80\\web.config line 909)"
Observed in production logs:
- A few independent examples (different tenants, sites, drives), which are getting affected by this issue, show the same exception type and the same web.config line reference.
- This error is usually temporary for affected tenants, but everyday we can find a few another tenants which are experiencing this issue.
Another observations:
- The request is read-only and quite simple ($top=1, orderby Id desc, select Id) — yet the server returns a configuration exception.
- The error message references a server-side file path:
C:\inetpub\wwwroot\wss\VirtualDirectories\80\web.config line 909
which suggests this failure originates inside SharePoint/IIS hosting infrastructure, not from client payload/formatting.
- Because the failure happens against SharePoint Online tenants, we cannot inspect or fix the referenced web.config (server-owned).
- The error appears intermittently: the same operation may succeed at other times for the same tenant/list.
Questions:
- Is this error by design (e.g., a transient infrastructure failure surfaced as 500)?
- What is the actual root cause behind:
System.Configuration.ConfigurationErrorsException pointing to web.config line 909?
- Is there a recommended client-side handling strategy besides retries (e.g., specific headers, correlation IDs, or backoff rules)?
What type of issue is this?
Question
What SharePoint development model, framework, SDK or API is this about?
SharePoint REST API
Target SharePoint environment
SharePoint Online
What browser(s) / client(s) have you tested
Additional environment details
Request is done using
Application Permissions.Issue description
When executing SharePoint REST API requests to enumerate list items (in our case: getting the last item ID for a list/drive), sometimes we receive the following error:
Request (example):
Response:
Observed in production logs:
Another observations:
C:\inetpub\wwwroot\wss\VirtualDirectories\80\web.config line 909which suggests this failure originates inside SharePoint/IIS hosting infrastructure, not from client payload/formatting.
Questions:
System.Configuration.ConfigurationErrorsExceptionpointing toweb.config line 909?