Permission & Access Issues

Fix SharePoint 2013 NTLM POST Request 403 Forbidden Error

Emma BrownEmma Brown Oct 7, 2026 872 views

Question details

The user is encountering an HTTP 403 Forbidden error when attempting to create a new list item in SharePoint 2013 using a REST API POST request with libcurl and NTLM authentication.

Fix SharePoint 2013 NTLM POST Request 403 Forbidden Error
Product
SharePoint 2013
Device & OS
not provided
Scenario
Creating a new SharePoint list item programmatically using an on-premises REST POST request with libcurl and NTLM authentication.
Observed behavior
GET requests authenticate and execute successfully, but POST requests fail with an HTTP 403 Forbidden response.
Before you start

Ensure that your libcurl configuration is properly handling the multi-stage NTLM authentication handshake and that the user account executing the request has 'Contribute' permissions on the target SharePoint list.

Solution 1Recommended

Include a Request Digest Token in Headers

SharePoint REST APIs require a Form Digest token for any state-changing operations (POST, PUT, DELETE) to prevent Cross-Site Request Forgery (CSRF).

By design, SharePoint 2013 allows GET requests without a digest token because they only read data. However, POST requests modify the server state. You must first request a token from the server and include it in the headers of your subsequent POST request.

1
Request the Digest Token

Send an empty POST request to the endpoint `http://<site_url>/_api/contextinfo` using your libcurl script, ensuring NTLM authentication is enabled.

2
Extract the Token Value

Parse the response to find the token. If you request JSON format (`Accept: application/json;odata=verbose`), the token is located in `d.GetContextWebInformation.FormDigestValue`.

3
Append Token to POST Headers

In your actual POST request to create the list item, add the custom HTTP header `X-RequestDigest: <token_value>`.

Include a Request Digest Token in Headers
Token Expiration: Request digest tokens in SharePoint are typically valid for 30 minutes. If your application runs continuously, you must fetch a new token before the current one expires.
Free Microsoft Office alternative

Enhance Your Document Workflow with WPS Office

If you are developing enterprise solutions or managing documents across teams, consider using WPS Office. It provides a lightweight, highly compatible, and cost-effective alternative to Microsoft Office, ensuring seamless productivity without heavy licensing fees.

  1. 1. Download the Installer: Visit the official WPS Office website and download the free installer for your operating system.
  2. 2. Install WPS Office: Run the setup file and follow the quick installation prompts to set up your workspace.
  3. 3. Open Office Documents Seamlessly: Instantly open, edit, and save your existing Microsoft Word, Excel, and PowerPoint files with perfect formatting retention.
Completely free and lightweight office suite for daily productivityFully compatible with Microsoft Office formats (.docx, .xlsx, .pptx)Familiar tabbed user interface ensuring zero learning curve for seamless migrationBuilt-in PDF editing, conversion, and document management tools
microsoft office alternative - wps office

Frequently Asked Questions

Why do GET requests work but POST requests return 403 Forbidden in SharePoint REST API?

GET requests only read data and do not modify the server state, so they do not require a request digest token. POST requests modify data, triggering SharePoint's Cross-Site Request Forgery (CSRF) protection, which strictly requires an X-RequestDigest header for validation.

How do I get the X-RequestDigest token in SharePoint 2013?

You can retrieve this token by making an empty POST request to `http://<site_url>/_api/contextinfo` with an `Accept: application/json;odata=verbose` header. The token will be returned in the `d.GetContextWebInformation.FormDigestValue` property of the response body.

How long is a SharePoint request digest token valid?

By default, a request digest token in SharePoint is valid for 30 minutes. If your automation script or application runs longer than this timeframe, you will need to programmatically request a fresh token to avoid encountering subsequent 403 Forbidden errors.