What is the problem you are having with rclone?
Can't get Onedrive to authenticate with 2-factor authentication disabled. This happens in windows and Linux. Happening WITH 2FA as well now.
2 of my accounts work fine. The third is giving me this error:
Failed to query available drives: HTTP error 403 (403 Forbidden) returned body: "{"error":{"code":"accessDenied","message":"Access denied","innerError":{"date":"2023-06-01T03:15:04","request-id":"76872a43-fae8-4ac3-902d-096cbeee92c1","client-request-id":"76872a43-fae8-4ac3-902d-096cbeee92c1"}}}"
If I use the GUI config tool I get this error:
Error creating config. Error: Request failed with status code 500
Run the command 'rclone version' and share the full output of the command.
rclone v1.62.2
- os/version: linuxmint 21.1 (64 bit)
- os/kernel: 5.15.0-70-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.20.2
- go/linking: static
- go/tags: none
Are you on the latest version of rclone? You can validate by checking the version listed here: Rclone downloads
--> YES
Which cloud storage system are you using? (eg Google Drive)
Onedrive
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone config
The rclone config contents with secrets removed.
Paste config here
A log from the command with the -vv
flag
C:\Users\sarah>rclone -vv config
2023/05/31 23:18:35 DEBUG : rclone: Version "v1.62.2" starting with parameters ["rclone" "-vv" "config"]
2023/05/31 23:18:35 DEBUG : Using config file from "C:\\Users\\sarah\\AppData\\Roaming\\rclone\\rclone.conf"
Current remotes:
Name Type
==== ====
Backblaze b2
Onedrive-dking onedrive
S21 smb
ann onedrive
onedrive-sarah onedrive
s21sftp sftp
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 > Backblaze
2 > Onedrive-dking
3 > S21
4 > ann
5 > onedrive-sarah
6 > s21sftp
remote> 4
Editing existing "ann" remote with options:
- type: onedrive
- token: REMOVED TOKEN
2023/05/31 23:18:56 DEBUG : ann: config in: state="*all", result=""
2023/05/31 23:18:56 DEBUG : ann: config out: out=&{State:*all-set,0,false Option: OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:18:56 DEBUG : ann: config: reading config parameter "client_id"
Option client_id.
OAuth Client Id.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_id>
2023/05/31 23:19:10 DEBUG : ann: config in: state="*all-set,0,false", result=""
2023/05/31 23:19:10 DEBUG : ann: config out: out=&{State:*all,1,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:10 DEBUG : ann: config in: state="*all,1,false", result=""
2023/05/31 23:19:10 DEBUG : ann: config out: out=&{State:*all-set,1,false Option: OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:10 DEBUG : ann: config: reading config parameter "client_secret"
Option client_secret.
OAuth Client Secret.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_secret>
2023/05/31 23:19:12 DEBUG : ann: config in: state="*all-set,1,false", result=""
2023/05/31 23:19:12 DEBUG : ann: config out: out=&{State:*all,2,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:12 DEBUG : ann: config in: state="*all,2,false", result=""
2023/05/31 23:19:12 DEBUG : ann: config out: out=&{State:*all,3,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:12 DEBUG : ann: config in: state="*all,3,false", result=""
2023/05/31 23:19:12 DEBUG : ann: config out: out=&{State:*all,4,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:12 DEBUG : ann: config in: state="*all,4,false", result=""
2023/05/31 23:19:12 DEBUG : ann: config out: out=&{State:*all,5,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:12 DEBUG : ann: config in: state="*all,5,false", result=""
2023/05/31 23:19:12 DEBUG : ann: config out: out=&{State:*all-set,5,false Option:global OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:12 DEBUG : ann: config: reading config parameter "region"
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>
2023/05/31 23:19:14 DEBUG : ann: config in: state="*all-set,5,false", result="global"
2023/05/31 23:19:14 DEBUG : ann: config out: out=&{State:*all,6,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:14 DEBUG : ann: config in: state="*all,6,false", result=""
2023/05/31 23:19:14 DEBUG : ann: config out: out=&{State:*all,7,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:14 DEBUG : ann: config in: state="*all,7,false", result=""
2023/05/31 23:19:14 DEBUG : ann: config out: out=&{State:*all,8,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:14 DEBUG : ann: config in: state="*all,8,false", result=""
2023/05/31 23:19:14 DEBUG : ann: config out: out=&{State:*all,9,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:14 DEBUG : ann: config in: state="*all,9,false", result=""
2023/05/31 23:19:14 DEBUG : ann: config out: out=&{State:*all,10,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:14 DEBUG : ann: config in: state="*all,10,false", result=""
2023/05/31 23:19:14 DEBUG : ann: config out: out=&{State:*all,11,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:14 DEBUG : ann: config in: state="*all,11,false", result=""
2023/05/31 23:19:14 DEBUG : ann: config out: out=&{State:*all,12,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:14 DEBUG : ann: config in: state="*all,12,false", result=""
2023/05/31 23:19:14 DEBUG : ann: config out: out=&{State:*all,13,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:14 DEBUG : ann: config in: state="*all,13,false", result=""
2023/05/31 23:19:14 DEBUG : ann: config out: out=&{State:*all,14,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:14 DEBUG : ann: config in: state="*all,14,false", result=""
2023/05/31 23:19:14 DEBUG : ann: config out: out=&{State:*all,15,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:14 DEBUG : ann: config in: state="*all,15,false", result=""
2023/05/31 23:19:14 DEBUG : ann: config out: out=&{State:*all,16,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:14 DEBUG : ann: config in: state="*all,16,false", result=""
2023/05/31 23:19:14 DEBUG : ann: config out: out=&{State:*all,17,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:14 DEBUG : ann: config in: state="*all,17,false", result=""
2023/05/31 23:19:14 DEBUG : ann: config out: out=&{State:*all,18,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:14 DEBUG : ann: config in: state="*all,18,false", result=""
2023/05/31 23:19:14 DEBUG : ann: config out: out=&{State:*all,19,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:14 DEBUG : ann: config in: state="*all,19,false", result=""
2023/05/31 23:19:14 DEBUG : ann: config out: out=&{State:*all,20,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:14 DEBUG : ann: config in: state="*all,20,false", result=""
2023/05/31 23:19:14 DEBUG : ann: config out: out=&{State:*all,21,false Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:14 DEBUG : ann: config in: state="*all,21,false", result=""
2023/05/31 23:19:14 DEBUG : ann: config out: out=&{State:*all-advanced Option:false OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:14 DEBUG : ann: config: reading config parameter "config_fs_advanced"
Edit advanced config?
y) Yes
n) No (default)
y/n>
2023/05/31 23:19:26 DEBUG : ann: config in: state="*all-advanced", result="false"
2023/05/31 23:19:26 DEBUG : ann: config out: out=&{State:*postconfig Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:26 DEBUG : ann: config in: state="*postconfig", result=""
2023/05/31 23:19:26 DEBUG : ann: config in: state="", result=""
2023/05/31 23:19:26 DEBUG : ann: config out: out=&{State:*oauth,choose_type,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:26 DEBUG : ann: config out: out=&{State:*oauth,choose_type,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:26 DEBUG : ann: config in: state="*oauth,choose_type,,", result=""
2023/05/31 23:19:26 DEBUG : ann: config out: out=&{State:*oauth-confirm,choose_type,, Option:true OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:26 DEBUG : ann: config: reading config parameter "config_refresh_token"
Already have a token - refresh?
y) Yes (default)
n) No
y/n>
2023/05/31 23:19:29 DEBUG : ann: config in: state="*oauth-confirm,choose_type,,", result="true"
2023/05/31 23:19:29 DEBUG : ann: config out: out=&{State:*oauth-islocal,choose_type,, Option:true OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:29 DEBUG : ann: config: reading config parameter "config_is_local"
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) Yes (default)
n) No
y/n>
2023/05/31 23:19:31 DEBUG : ann: config in: state="*oauth-islocal,choose_type,,", result="true"
2023/05/31 23:19:31 DEBUG : ann: config out: out=&{State:*oauth-do,choose_type,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:31 DEBUG : ann: config in: state="*oauth-do,choose_type,,", result=""
2023/05/31 23:19:31 DEBUG : Starting auth server on 127.0.0.1:53682
2023/05/31 23:19:31 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=69tt7V8GFI86-hG9Eq6PvA
2023/05/31 23:19:31 NOTICE: Log in and authorize rclone for access
2023/05/31 23:19:31 NOTICE: Waiting for code...
2023/05/31 23:19:32 DEBUG : Redirecting browser to: https://login.microsoftonline.com/common/oauth2/v2.0/authorize?access_type=offline&client_id=b15665d9-eda6-4092-8539-0eec376afd59&redirect_uri=http%3A%2F%2Flocalhost%3A53682%2F&response_type=code&scope=Files.Read+Files.ReadWrite+Files.Read.All+Files.ReadWrite.All+Sites.Read.All+offline_access&state=69tt7V8GFI86-hG9Eq6PvA
2023/05/31 23:19:45 DEBUG : Received GET request on auth server to "/"
2023/05/31 23:19:45 NOTICE: Got code
2023/05/31 23:19:45 DEBUG : Closing auth server
2023/05/31 23:19:45 DEBUG : Closed auth server with error: accept tcp 127.0.0.1:53682: use of closed network connection
2023/05/31 23:19:46 DEBUG : Saving config "token" in section "ann" of the config file
2023/05/31 23:19:46 DEBUG : Keeping previous permissions for config file: -rw-rw-rw-
2023/05/31 23:19:46 DEBUG : ann: Saved new token in config file
2023/05/31 23:19:46 DEBUG : ann: config out: out=&{State:*oauth-done,choose_type,, Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:46 DEBUG : ann: config in: state="*oauth-done,choose_type,,", result=""
2023/05/31 23:19:46 DEBUG : ann: config out: out=&{State:choose_type Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:46 DEBUG : ann: config in: state="choose_type", result=""
2023/05/31 23:19:46 DEBUG : ann: config out: out=&{State:choose_type_done Option:onedrive OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:19:46 DEBUG : ann: config: reading config parameter "config_type"
Option config_type.
Type of connection
Choose a number from below, or type in an existing string value.
Press Enter for the default (onedrive).
1 / OneDrive Personal or Business
\ (onedrive)
2 / Root Sharepoint site
\ (sharepoint)
/ Sharepoint site name or URL
3 | E.g. mysite or https://contoso.sharepoint.com/sites/mysite
\ (url)
4 / Search for a Sharepoint site
\ (search)
5 / Type in driveID (advanced)
\ (driveid)
6 / Type in SiteID (advanced)
\ (siteid)
/ Sharepoint server-relative path (advanced)
7 | E.g. /teams/hr
\ (path)
config_type>
2023/05/31 23:20:40 DEBUG : ann: config in: state="choose_type_done", result="onedrive"
2023/05/31 23:20:40 DEBUG : ann: config out: out=&{State:onedrive Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:20:40 DEBUG : ann: config in: state="onedrive", result=""
2023/05/31 23:20:41 DEBUG : ann: config out: out=&{State:choose_type Option:<nil> OAuth:<nil> Error:Failed to query available drives: HTTP error 403 (403 Forbidden) returned body: "{\"error\":{\"code\":\"accessDenied\",\"message\":\"Access denied\",\"innerError\":{\"date\":\"2023-06-01T03:20:54\",\"request-id\":\"747428f0-2377-4efd-b862-f9456cd0b733\",\"client-request-id\":\"747428f0-2377-4efd-b862-f9456cd0b733\"}}}" Result:}, err=<nil>
Failed to query available drives: HTTP error 403 (403 Forbidden) returned body: "{\"error\":{\"code\":\"accessDenied\",\"message\":\"Access denied\",\"innerError\":{\"date\":\"2023-06-01T03:20:54\",\"request-id\":\"747428f0-2377-4efd-b862-f9456cd0b733\",\"client-request-id\":\"747428f0-2377-4efd-b862-f9456cd0b733\"}}}"
2023/05/31 23:20:41 DEBUG : ann: config in: state="choose_type", result=""
2023/05/31 23:20:41 DEBUG : ann: config out: out=&{State:choose_type_done Option:onedrive OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:20:41 DEBUG : ann: config: reading config parameter "config_type"
Option config_type.
Type of connection
Choose a number from below, or type in an existing string value.
Press Enter for the default (onedrive).
1 / OneDrive Personal or Business
\ (onedrive)
2 / Root Sharepoint site
\ (sharepoint)
/ Sharepoint site name or URL
3 | E.g. mysite or https://contoso.sharepoint.com/sites/mysite
\ (url)
4 / Search for a Sharepoint site
\ (search)
5 / Type in driveID (advanced)
\ (driveid)
6 / Type in SiteID (advanced)
\ (siteid)
/ Sharepoint server-relative path (advanced)
7 | E.g. /teams/hr
\ (path)
config_type>
2023/05/31 23:21:28 DEBUG : ann: config in: state="choose_type_done", result="onedrive"
2023/05/31 23:21:28 DEBUG : ann: config out: out=&{State:onedrive Option:<nil> OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:21:28 DEBUG : ann: config in: state="onedrive", result=""
2023/05/31 23:21:28 DEBUG : ann: config out: out=&{State:choose_type Option:<nil> OAuth:<nil> Error:Failed to query available drives: HTTP error 403 (403 Forbidden) returned body: "{\"error\":{\"code\":\"accessDenied\",\"message\":\"Access denied\",\"innerError\":{\"date\":\"2023-06-01T03:21:41\",\"request-id\":\"fac246e5-b7ef-4e44-a735-779b05657919\",\"client-request-id\":\"fac246e5-b7ef-4e44-a735-779b05657919\"}}}" Result:}, err=<nil>
Failed to query available drives: HTTP error 403 (403 Forbidden) returned body: "{\"error\":{\"code\":\"accessDenied\",\"message\":\"Access denied\",\"innerError\":{\"date\":\"2023-06-01T03:21:41\",\"request-id\":\"fac246e5-b7ef-4e44-a735-779b05657919\",\"client-request-id\":\"fac246e5-b7ef-4e44-a735-779b05657919\"}}}"
2023/05/31 23:21:28 DEBUG : ann: config in: state="choose_type", result=""
2023/05/31 23:21:28 DEBUG : ann: config out: out=&{State:choose_type_done Option:onedrive OAuth:<nil> Error: Result:}, err=<nil>
2023/05/31 23:21:28 DEBUG : ann: config: reading config parameter "config_type"
Option config_type.
Type of connection
Choose a number from below, or type in an existing string value.
Press Enter for the default (onedrive).
1 / OneDrive Personal or Business
\ (onedrive)
2 / Root Sharepoint site
\ (sharepoint)
/ Sharepoint site name or URL
3 | E.g. mysite or https://contoso.sharepoint.com/sites/mysite
\ (url)
4 / Search for a Sharepoint site
\ (search)
5 / Type in driveID (advanced)
\ (driveid)
6 / Type in SiteID (advanced)
\ (siteid)
/ Sharepoint server-relative path (advanced)
7 | E.g. /teams/hr
\ (path)
config_type> 2023/05/31 23:21:47 Failed to read line: EOF
C:\Users\sarah>