Sharepoint 2016 via REST API: Error 403 Forbidden when trying to create SP List item

Priji John 0 Reputation points
2023-06-13T17:51:58.2966667+00:00

I am having an html form while submitting trying to add those values to a Sharepoint 2016 List. But unfortunately, I am getting "Access denied. You do not have permission to perform this action or access this resource."}}},"status":403,"statusText":"Forbidden" "

I followed the same way in this link

https://stackoverflow.com/questions/32435432/sharepoint-2013-via-rest-api-error-403-forbidden-when-trying-to-create-item/76467486#76467486 ( as per the user Vadim Gremyachev)

but was not a help to me.

Any leads on this?

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-06-14T07:03:13.3666667+00:00

    Hi @Priji John,

    The "Access denied" error you're encountering typically occurs when the user does not have sufficient permissions to perform the requested action in SharePoint. Here are a few steps you can take to troubleshoot and resolve the issue:

    1. Verify Permissions: Make sure that the user account you're using to access SharePoint has the necessary permissions to create items in the target list. Check with your SharePoint administrator to confirm the required permissions for creating list items.
    2. Appropriate Site Context: Ensure that you're providing the correct web URL for the SharePoint site where the target list is located. Double-check the parameter in the function and ensure it points to the correct site.webUrlcreateListItem
    3. List Name: Verify that the parameter in the function matches the actual name of the target list in SharePoint.listNamecreateListItem
    4. SharePoint Version Compatibility: Confirm that the SharePoint 2016 version you're working with supports the REST API endpoints you're using in your code. Some features or API endpoints may differ between SharePoint versions.
    5. Validate Form Digest: The function retrieves the form digest value, which is required for making authenticated requests to SharePoint. Ensure that the form digest value is being successfully obtained and included in the request headers (). Check if the property is returning a valid value.getFormDigest"X-RequestDigest"data.d.GetContextWebInformation.FormDigestValue.
    6. Network and Firewall Restrictions: Ensure that there are no network or firewall restrictions blocking the communication between your application and the SharePoint server. Check if any proxy settings or network configurations are preventing the requests from being processed.

    If the problem still exists, please provide more detailed code about your program, (note the protection of personal privacy), which will help to better solve the problem.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best Regards

    Cheng Feng

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.