Share via


Uploading file to MS sharepoint using CURL fails

Question

Thursday, October 15, 2015 3:36 AM

Hi everyone,

I've been trying to upload files from Unix to office 365 sharepoint with curl command.

The command  is :  

curl --anyauth -v --user username:password --location-trusted -k -T  filename   https://sharepoint-domain

Error Message below: 

HTTP/1.1 403 FORBIDDEN

X-MSDAVEXT_Error: 917656; Access denied. Before opening files in this location you must first browse to the web site and select the option to login automatically.

I'm able to login in with the credential in Chrome. So i'm thinking there's issue with redirect or cookies.

The file location has two redirects. First one has a username/password box with a "keep me signed in" checkbox. Once i put in my username it will be redirected to my company's login-in page. 

I would appreciate any ideas.

All replies (1)

Thursday, October 15, 2015 6:35 AM âś…Answered

Please have a look on below given earlier discussed threads:

http://sharepoint.stackexchange.com/questions/90962/uploading-a-file-to-a-library-with-curl-how-do-you-also-update-the-column-valu

http://sharepoint.stackexchange.com/questions/120844/automating-upload-and-download-using-script-in-linux-system

Hope this helps!

Cloud migration can be a tedious task without the right solution. Lepide Meteor suite has all you need to analyze/upgrade/migrate your current Exchange environment to Office 365 and also helps you migrate any legacy File Servers, SharePoint and Public Folders to SharePoint, Office 365 or OneDrive as required.