Share via

Sharepoint Upload API throws 403 Forbidden Error

Anonymous
2024-01-25T13:20:43+00:00

Hello,

We are using Sharepoint APIs to Upload and Download files. The Uploading of files were working absolutely fine untill yesterday and suddenly it is throwing 403 Forbidden Error. The security token , cookies and request digests are same for both operations. But when downloading it is working , for upload it is not working.

The API is consumed from Linux server through Java Spring Rest Template.

In Postman , it is showing the following error.

<?xml version="1.0" encoding="utf-8"?> <m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><m:code>-2130575251, System.Runtime.InteropServices.COMException</m:code><m:message xml:lang="en-US">The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.</m:message></m:error>

We checked all the permissions associated and everything seems fine.

Verified all the headers passed.

As the process is same for both upload and download, I wonder why suddenly only the Upload is running into error.

Suppose if the request digest value is not correct , how come it works for download?

Microsoft 365 and Office | SharePoint | For business | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Anonymous
    2024-01-25T14:40:17+00:00

    Hi respected Mugunthan,

    Thanks for replying. 😊

    If you understand my explanation and correct direction information about this entire scenario, I would like to request you to provide a valuable vote in above mentioned reply by using the feedback tool (pictured below) so that other users can understand the whole situation because other users will also search information in this community.

    From your valuable votes, other users can easily find this topic, you bring the thread to the forefront, providing better visibility and aiding other users in finding valuable guidance. Your feedback really means a lot to our dedicated community members.

    Your understanding and patience will be highly appreciated. Have a nice day!

    Sincerely,

    Tina

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2024-01-25T14:31:24+00:00

    Hi Tina,

    Thanks for redirecting to right place. I came for a 403 and you have given me a 302 😂

    Regards

    Mugunthan

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2024-01-25T13:54:29+00:00

    Dear P Mugunthan,

    Good day!!

    I understand your concern, considering that this issue happens when you use SharePoint APIs to upload files, I would like to suggest you post your concern in the dedicated channel Microsoft Q&A Community with SharePoint tag. We are sure that our experts from that team can address your query effectively and accurately.

    The reason I ask you to post a new thread is that in Microsoft Community, we mainly focus on SharePoint Online general and built-in feature queries, we have limited resources and very little knowledge about SharePoint APIs, and in Microsoft Q&A Community you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction.

    Thanks for your patience and understanding. I hope that you are keeping safe and well!

    Sincerely,

    Tina | Microsoft Community Moderator

    Was this answer helpful?

    0 comments No comments