Onedrive broken, but only for GET?

What is the problem you are having with rclone?

As of last week (more or less) I noticed that I can no longer copy from onedrive to my local machine. The behaviour is very similiar to this: Onedrive "Unauthenticated" when trying to copy/sync, but can use 'lsd' however in reverse. lsd works fine, and uploading a file works fine, yet when I come to download; I get:

2024/04/24 21:15:38 ERROR : testfile: Failed to copy: failed to open source object: unauthenticated: Unauthenticated
2024/04/24 21:15:38 ERROR : Attempt 1/3 failed with 1 errors and: failed to open source object: unauthenticated: Unauthenticated

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

rclone v1.66.0

  • os/version: debian 12.5 (64 bit)
  • os/kernel: 6.1.0-18-amd64 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.22.1
  • go/linking: static
  • go/tags: none

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

OneDrive Personal? I.e. the free one that you get with a @live.com email, nothing has been paid for

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

/usr/bin/rclone copy onedrive:/testfile ./testfile --retries=1 --dump headers -vv --multi-thread-streams=0

The rclone config contents with secrets removed.

[onedrive]
type = onedrive
token = {"access_token":"","token_type":"Bearer","refresh_token":"","expiry":"2024-04-24T21:37:38.926227395+01:00"}
drive_id = 0redacted0000000	
drive_type = personal

A log from the command with the -vv flag

2024/04/24 21:18:38 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2024/04/24 21:18:38 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2024/04/24 21:18:38 DEBUG : HTTP REQUEST (req 0xc00083fd40)
2024/04/24 21:18:38 DEBUG : GET /personal/REDACTED/_layouts/15/download.aspx?UniqueId=redacted-0000-0000-0000-000000000000&Translate=false&tempauth=REDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTEDREDACTED&ApiVersion=2.0 HTTP/1.1
Host: my.microsoftpersonalcontent.com
User-Agent: rclone/v1.66.0
Authorization: XXXX
Referer: https://graph.microsoft.com/v1.0/drives/REDACTED/items/REDACTED!REDACTED/content
Accept-Encoding: gzip

2024/04/24 21:18:38 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2024/04/24 21:18:40 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2024/04/24 21:18:40 DEBUG : HTTP RESPONSE (req 0xc00083fd40)
2024/04/24 21:18:40 DEBUG : HTTP/2.0 401 Unauthorized
Content-Length: 64
Cache-Control: private
Content-Security-Policy: frame-ancestors 'self' teams.microsoft.com *.teams.microsoft.com *.skype.com *.teams.microsoft.us local.teams.office.com *.office365.com *.powerapps.com *.yammer.com engage.cloud.microsoft *.officeapps.live.com *.office.com *.microsoft365.com *.stream.azure-test.net *.microsoftstream.com *.dynamics.com *.microsoft.com onedrive.live.com *.onedrive.live.com securebroker.sharepointonline.com;
Content-Type: application/json
Date: Wed, 24 Apr 2024 20:18:39 GMT
Microsoftsharepointteamservices: 16.0.0.24810
Microsoftsharepointteamservices: 16.0.0.24810
Ms-Cv: oSI+9+WAAIC5D9VXRhTJKQ.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: f73e22a1-80e5-8000-b90f-d5574614c929
Server: Microsoft-IIS/10.0
Spiislatency: 1
Spnumhops: 1
Sprequestduration: 168
Sprequestguid: f73e22a1-80e5-8000-b90f-d5574614c929
Strict-Transport-Security: max-age=31536000
Via: 189439;189460
Www-Authenticate: Wlid1.1 realm="WindowsLive", fault="BadContextToken", policy="MBI_SSL", ver="7.5.0.0", target="ssl.live.com", siteId="ssl.live.com"
Www-Authenticate: Bearer realm="redacted-0000-0000-0000-00000000000",client_id="00000003-0000-0ff1-ce00-000000000000",trusted_issuers="00000001-0000-0000-c000-000000000000@*,REDACTED-0000-0000-0000-000000000000@*,https://sts.windows.net/*/,https://login.microsoftonline.com/*/v2.0,00000003-0000-0ff1-ce00-000000000000@redacted-0000-0000-0000-000000000000",authorization_uri="https://login.microsoftonline.com/common/oauth2/authorize",resource_suffix="v2"
X-1dscollectorurl: https://eu-mobile.events.data.microsoft.com/OneCollector/1.0/
X-Ariacollectorurl: https://eu-mobile.events.data.microsoft.com/Collector/3.0
X-Aspnet-Version: 4.0.30319
X-Content-Type-Options: nosniff
X-Databoundary: EU
X-Frame-Options: SAMEORIGIN
X-Ms-Invokeapp: 1; RequireReadOnly
X-Ms-Suspended-Features: features=""
X-Networkstatistics: 0,525568,0,0,52,0,24241
X-Powered-By: ASP.NET
X-Sharepointhealthscore: 0

2024/04/24 21:18:40 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2024/04/24 21:18:40 ERROR : testfile: Failed to copy: failed to open source object: unauthenticated: Unauthenticated
2024/04/24 21:18:40 ERROR : Attempt 1/1 failed with 1 errors and: failed to open source object: unauthentic

did you recenly upgrade from an older rclone version that did work?

i get why you would want to test that flag. tho, have you tested without that flag?

Nope, I was using 1.60.1+dfsg-2+b5 from the debian repo and it stopped working by itself, no changes from me at all. I use rclone to backup by onedrive down to my NAS, and I created a new file on the onedrive and it's now been unable to copy that file down since. In reality, it could have been broken for a month or so I guess as I think that was the last time the content changed on onedrive it prior to that.

Yes, that was added as I was just basically copying ideas from the linked thread above, it doesn't work with or without that:

$ /usr/bin/rclone copy onedrive:/testfile ./testfile --retries=1
2024/04/25 09:29:22 ERROR : testfile: Failed to copy: failed to open source object: unauthenticated: Unauthenticated
2024/04/25 09:29:22 ERROR : Attempt 1/1 failed with 1 errors and: failed to open source object: unauthenticated: Unauthenticated
2024/04/25 09:29:22 Failed to copy: failed to open source object: unauthenticated: Unauthenticated

So, I've just built master from source and it's working fine there. Digging into the history it looks like it was fixed in: onedrive: fix "unauthenticated: Unauthenticated" errors when downloading · rclone/rclone@aee8d90 · GitHub

This is due to appear in v1.66.1 which is due shortly. I keep finding one more thing to fix though!

Excellent news, many thanks!

1 Like

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