OneDrive personal - unauthenticated, download only


What is the problem you are having with rclone?

Only affects download from remote - uploads are fine.

Unable to download a file from OneDrive to local. All attempts fail with Unauthenticated: unauthenticated.

Other operations are successful, for example:

  • Query remote on command line, e.g., rclone lsd remote:
  • Copy from local to remote: by cli
  • Mount remote to local filesystem
  • Copy to mounted remote using file manager

I get the same problem with rclone release version (v1.65.2) and beta (v1.66.0-beta.7678).
Tested on Debian 11 and Linux Mint 21.3 - no change.
Tested with rclone default ClientID and custom ClientID - no change.
Test with VPN to a different EU country (different MS location) - no change.

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

Failed (same symptoms) with rclone v1.65.2, now tested with beta.

rclone v1.66.0-beta.7678.a0dff2dd9
- os/version: debian 11.1 (64 bit)
- os/kernel: 5.10.0-27-amd64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.22rc2
- go/linking: static
- go/tags: none

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

OneDrive personal (5 GB), free account with email address.

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

rclone copy od1:/Documents/onebyte.txt /home/XXXX/onebyte.txt

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

type = onedrive
token = XXX
drive_id = XXX
drive_type = personal

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

CLI output:

2024/02/08 15:13:17 DEBUG : Creating backend with remote "od1:/Documents/onebyte.txt"
2024/02/08 15:13:17 DEBUG : Using config file from "/home/XXXX/.config/rclone/rclone.conf"
2024/02/08 15:13:19 DEBUG : fs cache: adding new entry for parent of "od1:/Documents/onebyte.txt", "od1:Documents"
2024/02/08 15:13:19 DEBUG : Creating backend with remote "/home/XXXX/onebyte.txt"
2024/02/08 15:13:19 DEBUG : onebyte.txt: Need to transfer - File not found at Destination
2024/02/08 15:13:20 ERROR : onebyte.txt: Failed to copy: failed to open source object: unauthenticated: Unauthenticated
2024/02/08 15:13:20 ERROR : Attempt 1/1 failed with 1 errors and: failed to open source object: unauthenticated: Unauthenticated
2024/02/08 15:13:20 INFO  : 
Transferred:   	          0 B / 0 B, -, 0 B/s, ETA -
Errors:                 1 (retrying may help)
Elapsed time:         2.9s

2024/02/08 15:13:20 DEBUG : 10 go routines active
2024/02/08 15:13:20 Failed to copy: failed to open source object: unauthenticated: Unauthenticated

Log file with --dump headers option:

hi, have you seen?


Yes, I have seen that, but it concerns uploads (local to remote), which I don't have a problem with (and both versions that I tested with include the fix from that thread).

Hi, just to keep this thread active, experiencing the same issue on onedrive personal (microsoft365 free) for download only using copy command. tested with both rclone 1.65 and current 1.66_DEV versions, I tried to get a first look at the code and debug it but I am missing skills here and did not had the best tools (gdb command line). My config used to work fine and stopped working a few days ago:

  • last successful download on Feb 6
  • 1st failed download on Feb 17

Could it be a change in microsoft365 ?
In the same period I changed my local system running rclone. I suspected an issue with authentication from different machine, but now testing from 2 raspberry pis, same results with both. Tried as well to use clientid with secret, and got same symptoms.

I have the same script working fine with onedrive business accounts.

Problem is that it is not replicable. I have multiple paid and free personal OneDrive accounts I use daily and I have no issues. So it is not some general problem but something specific to your setup.

hi, just tested that, worked fine for me.
my remote uses client id/secret.

Okay, I have made a new Microsoft account and the new OneDrive works as expected with rclone, so it would appear to be something 'different' with the old OneDrive.

For information, the old OneDrive works correctly, for all operations, with abraunegg's OneDrive Client for Linux. I don't know the precise history of this old OneDrive/Microsoft account – it's quite old and may even have started out as a TechNet account, though it is now just an ordinary personal account.

For me, I'll abandon the old OneDrive and call this fixed. I can get the uploaded files through the web interface. Thanks to all who responded.

1 Like

Thanks to both of you for your replies, and as well to @journey70 for sharing your resolution. I'll look into the direction of my account setup then.

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