-
-
Notifications
You must be signed in to change notification settings - Fork 370
Description
When attempting to access the SharePoint API endpoint /_api/contextInfo, the request fails with a 403 Client Error: Forbidden.
The server returns the following error message, indicating a permissions issue:
XML
<m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<m:code>-2147024891, System.UnauthorizedAccessException</m:code>
<m:message xml:lang="pt-BR">Attempted to perform an unauthorized operation.</m:message>
</m:error>
This System.UnauthorizedAccessException suggests that the client does not have the required permissions to perform the operation on the specified resource.
Option 2: Formal Bug Report Template
Issue Title: API Call to /_api/contextInfo Fails with System.UnauthorizedAccessException
Bug Report
-
Observed Behavior:
A request made to the SharePoint API endpoint https://mywork.sharepoint.com/sites/SiteWork/_api/contextInfo is failing with a 403 Forbidden status code. -
Expected Behavior:
The request should successfully return the context information for the site, likely in XML or JSON format, with a 200 OK status code. -
Error Details:
The full response body from the server is an XML error message:
XML
<m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<m:code>-2147024891, System.UnauthorizedAccessException</m:code>
<m:message xml:lang="pt-BR">Attempted to perform an unauthorized operation.</m:message>
</m:error>
HTTP Status Code: 403 Forbidden
Exception Code: -2147024891, System.UnauthorizedAccessException
Message: Attempted to perform an unauthorized operation.
- Analysis:
The error indicates an authorization problem. The user or application principal making the call lacks the necessary permissions to access this specific API resource on theMy List
SharePoint site. An investigation into the assigned permissions is required.