KB-1015 "403 Forbidden" error returned when uploading a file to SharePoint

Symptoms

Sending a file to Microsoft SharePoint 2013 using the a!shpCopyDocumentFromAppian() function returns a 403 Forbidden error from the SharePoint server.

Users are able to download files and get the list of files in SharePoint. This issue reproduces when SharePoint is hosted in a DMZ server.

The relevant errors in the application server log are as follows:

2014-08-13 15:56:36,158 [[ACTIVE] ExecuteThread: '10' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR com.appian.integration.sharepoint.function.SharepointIntegrationUploadFile - ConnectorRuntimeException [title=FORBIDDEN, com.appian.integration.exception.ConnectorRuntimeException: HTTP/1.1 403 FORBIDDEN , {"error":{"code":"-2130575251, System.Runtime.InteropServices.COMException","message":{"lang":"en-US","value":"The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again."}}}]
ConnectorRuntimeException [title=FORBIDDEN, com.appian.integration.exception.ConnectorRuntimeException: HTTP/1.1 403 FORBIDDEN , {"error":{"code":"-2130575251, System.Runtime.InteropServices.COMException","message":{"lang":"en-US","value":"The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again."}}}]
at com.appian.integration.sharepoint.SharepointIntegrationHandler.uploadFileHandle(SharepointIntegrationHandler.java:458)
...

Cause

Web Page Security Validation is turned on in SharePoint.

Action

To correct this issue, perform the following:

  1. Go to Sharepoint 2013 Central Administration
  2. Then go to Application Management > Web Applications > Manage web applications.
  3. Click on the web application, and on the top of the page click General Settings.
  4. Go to the Web Page Security Validation section, and select Off for Security Validations.
  5. Try again using the connectors.

Affected Versions

This article applies to all versions of Appian using SharePoint 2013.

Last Reviewed: July 2017

Related
Recommended