Fatal error: config failed to refresh token: Error: Auth Error Code: ""

What is the problem you are having with rclone?

I cannot connect with OneDrive, i followed step by step the manual from Microsoft OneDrive , opened the port 53682, when the browser is opened it says:

Failure!


Error: Auth Error

Description: No code returned by remote server".

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

rclone version
rclone v1.60.1-DEV

  • os/version: ubuntu 24.04 (64 bit)
  • os/kernel: 7.0.0-28-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.22.2
  • go/linking: dynamic
  • go/tags: none

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

[RemoteOneDrive_Client_ID_for_OneDrive_Personal]
type = onedrive
client_id = 58****************
client_secret = vv***********

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

rclone config

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

rclone config
Current remotes:

Name                 Type
====                 ====
RemoteOneDrive       onedrive
RemoteOneDrive_Client_ID_for_OneDrive_Personal onedrive

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> e

Select remote.
Choose a number from below, or type in an existing value.
 1 > RemoteOneDrive
 2 > RemoteOneDrive_Client_ID_for_OneDrive_Personal
remote> 2

Editing existing "RemoteOneDrive_Client_ID_for_OneDrive_Personal" remote with options:
- type: onedrive
- client_id: 58***************
- client_secret: vv***********

Option client_id.
OAuth Client Id.
Leave blank normally.
Enter a string value. Press Enter for the default (58***************).
client_id> 

Option client_secret.
OAuth Client Secret.
Leave blank normally.
Enter a string value. Press Enter for the default (vv***********).
client_secret> 

Option region.
Choose national cloud region for OneDrive.
Choose a number from below, or type in your own string value.
Press Enter for the default (global).
 1 / Microsoft Cloud Global
   \ (global)
 2 / Microsoft Cloud for US Government
   \ (us)
 3 / Microsoft Cloud Germany
   \ (de)
 4 / Azure and Office 365 operated by Vnet Group in China
   \ (cn)
region> 

Edit advanced config?
y) Yes
n) No (default)
y/n> 

Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine

y) Yes (default)
n) No
y/n> 

2026/08/12 12:22:24 NOTICE: Make sure your Redirect URL is set to "http://localhost:53682/" in your custom config.
2026/08/12 12:22:24 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=****************
2026/08/12 12:22:24 NOTICE: Log in and authorize rclone for access
2026/08/12 12:22:24 NOTICE: Waiting for code...
Error: config failed to refresh token: Error: Auth Error
Code: ""
Description: No code returned by remote server
Help: 
Usage:
  rclone config [flags]
  rclone config [command]

Available Commands:
  create      Create a new remote with name, type and options.
  delete      Delete an existing remote.
  disconnect  Disconnects user from remote
  dump        Dump the config file as JSON.
  file        Show path of configuration file in use.
  password    Update password in an existing remote.
  paths       Show paths used for configuration, cache, temp etc.
  providers   List in JSON format all the providers and options.
  reconnect   Re-authenticates user with remote.
  show        Print (decrypted) config file, or the config for a single remote.
  touch       Ensure configuration file exists.
  update      Update options in an existing remote.
  userinfo    Prints info about logged in user of remote.

Flags:
  -h, --help   help for config

Additional help topics:
  rclone config edit       Enter an interactive configuration session.

Use "rclone [command] --help" for more information about a command.
Use "rclone help flags" for to see the global flags.
Use "rclone help backends" for a list of supported services.

2026/08/12 12:22:25 Fatal error: config failed to refresh token: Error: Auth Error
Code: ""
Description: No code returned by remote server
Help: 

You have an ancient version of rclone. Update and re-test.