[Solved] Unable to login to OneDrive/Microsoft/Sharepoint

What is the problem you are having with rclone?

I am trying to configure rclone to sync from OneDrive in the context of a sharepoint application.

I create a new config called OneDrive
I choose "onedrive"
I insert a client_id
I insert client_secret
I've no idea of region, but I'm using 'global'
I choose to not edit advanced config
I choose to use auto config

I got this error

2021/12/07 11:10:11 Fatal error: config failed to refresh token: failed to start auth webserver: listen tcp 127.0.0.1:53682: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.

I retried running as admin, and nothing changes

I retried editing advanced config

  • token: i have not this, i left blank
  • auth_url: i have 3 urls, I do not know which to use
  1. https://login.microsoftonline.com/common/oauth2/nativeclient
  2. https://login.live.com/oauth20_desktop.srf
  3. msal://auth

.. what ?!

What is your rclone version (output from rclone version)

rclone v1.57.0
- os/version: Microsoft Windows 10 Pro 2009 (64 bit)
- os/kernel: 10.0.22000.348 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.17.2
- go/linking: dynamic
- go/tags: cmount

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

one_drive

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

rclone config

The rclone config contents with secrets removed.

I have nothing yet

A log from the command with the -vv flag

I've not log yet to share

I found a rclone.exe already running in the details tab of task manager.

I killed it, after that, I can do login.

Please add to documentation that it's working without disabling of Ms Windows Firewall, BUT add that is required to configure a callback url

Make sure your Redirect URL is set to "http://localhost:53682/" in your custom config.

Thanks

It's already documented on the OneDrive page:

Note that rclone runs a webserver on your local machine to collect the token as returned from Microsoft. This only runs from the moment it opens your browser to the moment you get back the verification code. This is on http://127.0.0.1:53682/ and this it may require you to unblock it temporarily if you are running a host firewall.

https://rclone.org/onedrive/

1 Like

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