Connect to OneDrive with rclone Failed with 400 bad Request

What is the problem you are having with rclone?

I am trying to establish a rclone connection to my OneDrive, which worked about 2 hours ago on another host.
I have now deleted the config etc. on the host in question, as I would like to use Onedrive on another host.

I have now carried out the same steps:

  • New Remote : onedrive

  • Option Storage: 36 (MS Onedrive)

  • client_id: none

  • client_secret: none

  • 1 / Microsoft Cloud Global

  • tenant: none

  • Edit advanced config? n

  • Use web browser to automatically authenticate rclone with remote?

  • Say Y if the machine running rclone has a web browser you can use
  • Say N if running rclone on a (remote) machine without web browser access
    If not sure try Y. If Y failed, try N
    y/n> n
  • Option config_token.
    For this to work, you will need rclone available on a machine that has
    a web browser available.
    For more help and alternate methods see: Remote Setup
    Execute the following on the machine with the web browser (same rclone
    version recommended):
    rclone authorize "onedrive"
    Then paste the result.
    Enter a value.
    config_token> {"access_token":"EwBIBMl6BAAUBKgm8k1UswUNwklmy2v7U/S+1fEAA........................

  • Option config_type.
    Type of connection
    Choose a number from below, or type in an existing value of type string.
    Press Enter for the default (onedrive).
    1 / OneDrive Personal or Business
    \ (onedrive)
    choice: 1

  • Option config_driveid.
    Here i use Nr. 1: 1 / AEEE102E-CFF8-4E2A-8........................ (personal)

and it comes this :
config_driveid> 1

Failed to query root for drive "b!8cIXkxg7uUeSfBn_pS3yHqG2Nlm40f9FgfCX97q-QiFOdbTaRdetTZIlVn0tu2pY": HTTP error 400 (400 Bad Request) returned body: "{"error":{"code":"invalidRequest","message":"ObjectHandle is Invalid","innerError":{"date":"2025-02-28T10:08:06","request-id":"592de511-6099-4e90-82c8-f60cd548f333","client-request-id":"592de511-6099-4e90-82c8-f60cd548f333"}}}"

Are you on the latest version of rclone?
root@pro:~# rclone version

rclone v1.69.1

  • os/version: debian 12.9 (64 bit)

  • os/kernel: 6.8.12-8-pve (x86_64)

  • os/type: linux

  • os/arch: amd64

  • go/version: go1.24.0

  • go/linking: static

  • go/tags: none

Which cloud storage system are you using? One Drive

Please run 'rclone config redacted' and share the full output. If you get [onedrive]

type = onedrive

token = XXX

Double check the config for sensitive info before posting publicly

root@pro:~# rclone config show
[onedrive]
type = onedrive
token = {"access_token":"EwBIBMl6BAA..............

I have the feeling that it's always the same token and the system doesn't accept it and keeps messing up the login.
I also deleted the rclone registration in the MS account and then did it again, but the error persists

![grafik|690x125](upload://qHzx9zzFCRYyPm75RA9KEmlGN8L.png)


can you somehow reset the token, because I have to do the authentication on the Windows computer every time via my Proxmox backup server (which I access via SSH) using rclone CMD.

This also worked earlier with the other client

In Proxmox comes Bat Request /mnt/onedrive/.chunks

welcome to the forum,

try https://rclone.org/remote_setup/#configuring-by-copying-the-config-file

yes , it is now in Proxmox, but i cant do a Backup
OneDrive' failed: exit code 255

but I can create and save files in OneDrive via the Proxmox server, why doesn't the backup work then?

exit code 255

lol, this is your help? pls

post a full debug log

1 Like