Sharepoint with webdav and rclone is not working properly

I have 2 backends that I am testing. I have no trouble with the S3 endpoint.
I am trying to get Sharepoint setup. It's using Office365.

Things I have tried:

  • Changed Consent for Permission on Directories and Files with Graph Explorer API to have read and write access for my user.
  • I have tried to use different urls.

What is the problem you are having with rclone?

rclone is having trouble listing directories and files on sharepoint backend.

Run the command 'rclone version' and share the full output of the command.

$ rclone version
rclone v1.57.0-DEV

  • os/version: almalinux 9.4 (64 bit)
  • os/kernel: 5.14.0-427.42.1.el9_4.x86_64 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.17.2
  • go/linking: dynamic
  • go/tags: none

Are you on the latest version of rclone? No

Which cloud storage system are you using? (eg Google Drive)

Sharepoint
S3

The command you were trying to run (eg rclone copy /tmp remote:tmp)

$ rclone ls sharepoint:
2024/11/25 23:19:57 ERROR : : error listing: directory not found
2024/11/25 23:19:57 Failed to ls with 2 errors: last error was: directory not found

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

$ cat ./.config/rclone/rclone.conf
[s3]
type = s3
provider = Minio
access_key_id = XXX
secret_access_key = XXXX
endpoint = http://10.10.0.4:9000
acl = public-read-write

[sharepoint]
type = webdav
vendor = sharepoint-ntlm
user = tony@XXXX-XXXX.com
pass = XXXXXXXXXXX
url = https://netorgft1234123.sharepoint.com/personal/tony_XXXXX-XXXXX_com/Documents

A log from the command that you were trying to run with the -vv flag

$ rclone ls sharepoint: -vv
2024/11/25 23:23:16 DEBUG : rclone: Version "v1.57.0-DEV" starting with parameters ["rclone" "ls" "sharepoint:" "-vv"]
2024/11/25 23:23:16 DEBUG : Creating backend with remote "sharepoint:"
2024/11/25 23:23:16 DEBUG : Using config file from "/home/user/.config/rclone/rclone.conf"
2024/11/25 23:23:16 DEBUG : found headers:
2024/11/25 23:23:17 ERROR : : error listing: directory not found
2024/11/25 23:23:17 DEBUG : 2 go routines active
2024/11/25 23:23:17 Failed to ls with 2 errors: last error was: directory not found

welcome to the forum,

  1. uninstall that three year old, custom compiled version??
  2. https://rclone.org/install/#script-installation
  3. test again...

Thanks, i have now the latest version:

$ ./rclone version
rclone v1.68.2
- os/version: almalinux 9.4 (64 bit)
- os/kernel: 5.14.0-427.42.1.el9_4.x86_64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.23.3
- go/linking: static
- go/tags: none

Errors:

$ ./rclone ls sharepoint: -vvvv
2024/11/26 00:19:34 DEBUG : rclone: Version "v1.68.2" starting with parameters ["./rclone" "ls" "sharepoint:" "-vvvv"]
2024/11/26 00:19:34 DEBUG : Creating backend with remote "sharepoint:"
2024/11/26 00:19:34 DEBUG : Using config file from "/home/defenderadmin/.config/rclone/rclone.conf"
2024/11/26 00:19:34 DEBUG : found headers:
2024/11/26 00:19:35 ERROR : : error listing: couldn't list files: 403 FORBIDDEN: 403 FORBIDDEN
2024/11/26 00:19:35 DEBUG : 6 go routines active
2024/11/26 00:19:35 NOTICE: Failed to ls with 2 errors: last error was: couldn't list files: 403 FORBIDDEN: 403 FORBIDDEN

The more debug output with --dump bodies:

$ ./rclone ls sharepoint: -vvvv --dump bodies
2024/11/26 00:19:07 NOTICE: Automatically setting -vv as --dump is enabled
2024/11/26 00:19:07 DEBUG : rclone: Version "v1.68.2" starting with parameters ["./rclone" "ls" "sharepoint:" "-vvvv" "--dump" "bodies"]
2024/11/26 00:19:07 DEBUG : Creating backend with remote "sharepoint:"
2024/11/26 00:19:07 DEBUG : Using config file from "/home/defenderadmin/.config/rclone/rclone.conf"
2024/11/26 00:19:07 DEBUG : found headers:
2024/11/26 00:19:07 DEBUG : You have specified to dump information. Please be noted that the Accept-Encoding as shown may not be correct in the request and the response may not show Content-Encoding if the go standard libraries auto gzip encoding was in effect. In this case the body of the request will be gunzipped before showing it.
2024/11/26 00:19:07 DEBUG : You have specified to dump information. Please be noted that the Accept-Encoding as shown may not be correct in the request and the response may not show Content-Encoding if the go standard libraries auto gzip encoding was in effect. In this case the body of the request will be gunzipped before showing it.
2024/11/26 00:19:07 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2024/11/26 00:19:07 DEBUG : HTTP REQUEST (req 0xc0000dedc0)
2024/11/26 00:19:07 DEBUG : PROPFIND /sites/Testsite/Shared%20Documents/ HTTP/1.1
Host: netorgft7311896.sharepoint.com
User-Agent: rclone/v1.68.2
Depth: 1
Referer: https://netorgft7311896.sharepoint.com/sites/Testsite/Shared%20Documents/
Accept-Encoding: gzip

2024/11/26 00:19:07 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2024/11/26 00:19:07 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2024/11/26 00:19:07 DEBUG : HTTP RESPONSE (req 0xc0000dedc0)
2024/11/26 00:19:07 DEBUG : HTTP/1.1 403 FORBIDDEN
Content-Length: 13
Content-Type: text/plain; charset=utf-8
Date: Tue, 26 Nov 2024 00:19:07 GMT
Microsoftsharepointteamservices: 16.0.0.25423
Ms-Cv: oWeALnAgAHAcmWvDlLnTjw.0
P3p: CP="ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI"
Request-Id: 2e8067a1-2070-7000-1c99-6bc394b9d38f
Server: Microsoft-IIS/10.0
Sprequestguid: 2e8067a1-2070-7000-1c99-6bc394b9d38f
X-1dscollectorurl: https://mobile.events.data.microsoft.com/OneCollector/1.0/
X-Ariacollectorurl: https://browser.pipe.aria.microsoft.com/Collector/3.0/
X-Content-Type-Options: nosniff
X-Databoundary: NONE
X-Forms_based_auth_required: https://netorgft7311896.sharepoint.com/_forms/default.aspx?ReturnUrl=/_layouts/15/error.aspx&Source=/sites/Testsite
X-Forms_based_auth_return_url: https://netorgft7311896.sharepoint.com/_layouts/15/error.aspx
X-Idcrl_auth_params_v1: IDCRL Type="BPOSIDCRL", EndPoint="/sites/Testsite/_vti_bin/idcrl.svc/", RootDomain="sharepoint.com", Policy="MBI"
X-Ms-Invokeapp: 1; RequireReadOnly
X-Msdavext_error: 917656; Access+denied.+Before+opening+files+in+this+location%2c+you+must+first+browse+to+the+web+site+and+select+the+option+to+login+automatically.
X-Networkstatistics: 0,32128,0,0,201,0,25847,60
X-Powered-By: ASP.NET
X-Sharepointhealthscore: 2

403 FORBIDDEN
2024/11/26 00:19:07 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2024/11/26 00:19:07 ERROR : : error listing: couldn't list files: 403 FORBIDDEN: 403 FORBIDDEN
2024/11/26 00:19:07 DEBUG : 6 go routines active
2024/11/26 00:19:07 NOTICE: Failed to ls with 2 errors: last error was: couldn't list files: 403 FORBIDDEN: 403 FORBIDDEN

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.