OneDrive Personal: rclone copy fails with unauthenticated: Unauthenticated when copying from a shared folder ("Add shortcut to My files")

Rclone Version

rclone v1.75.0
os/version: Microsoft Windows 11 Home Single Language 25H2 25H2 (64 bit)
os/kernel: 10.0.26200.8875 (x86_64)
os/type: windows
os/arch: amd64
go/version: go1.26.5
go/linking: static
go/tags: cmount

Remote configuration
[onedrive]
type = onedrive
token = XXX
drive_id = XXX
drive_type = personal

Problem

Rclone copy fails with "Failed to copy: unauthenticated: Unauthenticated" for every file when copying directly from a shared OneDrive folder into my own OneDrive.

The source folder belongs to another Microsoft Personal account and is shared with me using "Add shortcut to My files".

For example:

rclone copy \ "onedrive:Photos Test/DSC_0001.JPG" \ "onedrive:TestCopy" \ -vv

Result: ERROR : DSC_0001.JPG: Failed to copy: unauthenticated: Unauthenticated

Troubleshooting performed

  1. List Directories -> works

rclone lsd "onedrive:Photos Test/"

  1. Listing metadata -> Works
    rclone lsjson "onedrive:Photos Test" --metadata

  2. Reading file contentes -> Works
    rclone cat "onedrive:Photos Test/DSC_0001.JPG"

  3. Copying from shared OneDrive to local disk -> Works
    rclone copy \ "onedrive:Photos Test/DSC_0001.JPG" C:\Temp\Test

  4. Uploading local files to my OneDrive -> Works
    echo test>test.txt
    rclone copy test.txt onedrive:TestCopy

Summary

So only direct transfer from Mapped Shared OneDrive Folder -> MyOnedrive will fail.

Shared OneDrive folder ("Add shortcut to My files")

rclone copy

My OneDrive

Additional Observations:

  • Using --server-side-across-configs does not change the behavior.
  • Disabling multithread streams (--multi-thread-streams 0) also makes no difference.
  • Reauthenticating with rclone config reconnect onedrive: does not solve the problem.

HTTP Trace

The metadata request succeeds:

GET /v1.0/drives/<owner_drive>/items/...:/DSC_0001.JPG

returns:

HTTP/1.1 200 OK

However, during the copy operation another Graph request returns:

{
"error": {
"code": "unauthenticated",
"message": "Unauthenticated"
}
}

Unfortunately I could not identify which Graph endpoint produced that response.

welcome to the forum,

have you followed the steps at Can not access Shared with me files
"Shared with me files is not supported by rclone currently, but there is a workaround"

Implement OneDrive shared with me #4062

Thanks for the suggestion!

Yes, I followed the workaround described in "Can not access Shared with me files".

The shared folder was added using "Add shortcut to My files", and I can successfully access it through rclone. For example:

  • rclone lsd works.
  • rclone lsjson works.
  • rclone cat works.
  • rclone copy from the shared folder to a local directory also works.

The only operation that fails is copying directly from the shared OneDrive folder to my own OneDrive, for example:

rclone copy "onedrive:Photos Test/DSC_0001.JPG" "onedrive:TestCopy"

This consistently fails with:

Failed to copy: unauthenticated: Unauthenticated

welcome
i also posted additional links, did you read them?


afiak, the feature you want is not officially supported by rclone, so this topic is not a bug,
instead it appears to be a request for help and support, correct?

I checked the additional links, but I don't think they describe the same problem.

I'm using OneDrive Personal (not OneDrive for Business), and I'm already using the recommended workaround by adding the shared folder using "Add shortcut to My files", which creates a shortcut in my OneDrive.

The workaround works for me in general: I can list the folder, read files (rclone cat), and copy files to a local directory.

The only operation that fails is copying directly from the shortcut to my own OneDrive using rclone copy, which always returns:

Failed to copy: unauthenticated: Unauthenticated

So my impression is that this is a different issue, or that the workaround no longer supports direct OneDrive-to-OneDrive copies from a shortcut.

for a deeper look at the api calls, try --dump=headers