Configuration - Ondrive for business: cannot get a token

What is the problem you are having with rclone?

While configuring, the Windows account login window appears instead of the office-com account login window:

\
grafik
\\

The company domain is unknown to the Windows account, because it is used for the office-com account. So I am not able to get the token.

I created in the Azure AD a rclone app setup with client_id and client_secret and applied it to the rclone config. But I got the same wrong account window.

I also tried Chromium webbrowser: same result.

Alternatetively I installed rclone in Windows 10: same result.

What is your rclone version (output from rclone version)

\
REDACT~> rclone version
rclone v1.57.0

  • os/version: opensuse-leap 15.3 (64 bit)
  • os/kernel: 5.3.18-59.37-preempt (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.17.2
  • go/linking: static
  • go/tags: none
    \\

I tried it in the same way in a Windows 10 installation and got the same behavior.

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

Onedrive for business included in the Microsoft 365 business premium plan

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

rclone config

Paste command here



#### The rclone config contents with secrets removed.  

Paste config here
\\\
REDACT:~> rclone config 
2022/01/03 17:58:53 NOTICE: Config file "/home/REDACT/.config/rclone/rclone.conf" not found - using defaults
No remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
name> onedrive
Option Storage.
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value.
 1 / 1Fichier
   \ "fichier"
 2 / Alias for an existing remote
   \ "alias"
 3 / Amazon Drive
   \ "amazon cloud drive"
 4 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, Digital Ocean, Dreamhost, IBM COS, Minio, SeaweedFS, and Tencent COS
   \ "s3"
 5 / Backblaze B2
   \ "b2"
 6 / Better checksums for other remotes
   \ "hasher"
 7 / Box
   \ "box"
 8 / Cache a remote
   \ "cache"
 9 / Citrix Sharefile
   \ "sharefile"
10 / Compress a remote
   \ "compress"
11 / Dropbox
   \ "dropbox"
12 / Encrypt/Decrypt a remote
   \ "crypt"
13 / Enterprise File Fabric
   \ "filefabric"
14 / FTP Connection
   \ "ftp"                                                                                                                                                                                 
15 / Google Cloud Storage (this is not Google Drive)
   \ "google cloud storage"                                                                                                                                                                
16 / Google Drive
   \ "drive"                                                                                                                                                                               
17 / Google Photos
   \ "google photos"                                                                                                                                                                       
18 / Hadoop distributed file system
   \ "hdfs"                                                                                                                                                                                
19 / Hubic
   \ "hubic"                                                                                                                                                                               
20 / In memory object storage system.
   \ "memory"                                                                                                                                                                              
21 / Jottacloud
   \ "jottacloud"                                                                                                                                                                          
22 / Koofr
   \ "koofr"                                                                                                                                                                               
23 / Local Disk
   \ "local"                                                                                                                                                                               
24 / Mail.ru Cloud
   \ "mailru"                                                                                                                                                                              
25 / Mega
   \ "mega"                                                                                                                                                                                
26 / Microsoft Azure Blob Storage
   \ "azureblob"                                                                                                                                                                           
27 / Microsoft OneDrive
   \ "onedrive"                                                                                                                                                                            
28 / OpenDrive
   \ "opendrive"                                                                                                                                                                           
29 / OpenStack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
   \ "swift"                                                                                                                                                                               
30 / Pcloud
   \ "pcloud"                                                                                                                                                                              
31 / Put.io
   \ "putio"                                                                                                                                                                               
32 / QingCloud Object Storage
   \ "qingstor"                                                                                                                                                                            
33 / SSH/SFTP Connection
   \ "sftp"                                                                                                                                                                                
34 / Sia Decentralized Cloud
   \ "sia"                                                                                                                                                                                 
35 / Sugarsync
   \ "sugarsync"                                                                                                                                                                           
36 / Tardigrade Decentralized Cloud Storage
   \ "tardigrade"                                                                                                                                                                          
37 / Transparently chunk/split large files
   \ "chunker"                                                                                                                                                                             
38 / Union merges the contents of several upstream fs
   \ "union"                                                                                                                                                                               
39 / Uptobox
   \ "uptobox"                                                                                                                                                                             
40 / Webdav
   \ "webdav"                                                                                                                                                                              
41 / Yandex Disk
   \ "yandex"                                                                                                                                                                              
42 / Zoho
   \ "zoho"
43 / http Connection
   \ "http"
44 / premiumize.me
   \ "premiumizeme"
45 / seafile
   \ "seafile"
Storage> 27
Option client_id.
OAuth Client Id.
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_id> 
Option client_secret.
OAuth Client Secret.
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret> 
Option region.
Choose national cloud region for OneDrive.
Enter a string value. Press Enter for the default ("global").
Choose a number from below, or type in your own value.
 1 / Microsoft Cloud Global
   \ "global"
 2 / Microsoft Cloud for US Government
   \ "us"
 3 / Microsoft Cloud Germany
   \ "de"
 4 / Azure and Office 365 operated by 21Vianet in China
   \ "cn"
region> 3
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> 
2022/01/03 17:59:43 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=TwIGxwu5SexrtTnl-lXtCQ
2022/01/03 17:59:43 NOTICE: Log in and authorize rclone for access
2022/01/03 17:59:43 NOTICE: Waiting for code...
^C
\\\



#### A log from the command with the `-vv` flag  

Paste  log here

\
REDACT:~> rclone config -vv
2022/01/03 18:38:34 DEBUG : rclone: Version "v1.57.0" starting with parameters ["rclone" "config" "-vv"]
2022/01/03 18:38:34 DEBUG : Using config file from "/home/REDACT/.config/rclone/rclone.conf"
No remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
name> onedrive
Option Storage.
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value.
1 / 1Fichier
\ "fichier"
2 / Alias for an existing remote
\ "alias"
3 / Amazon Drive
\ "amazon cloud drive"
4 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, Digital Ocean, Dreamhost, IBM COS, Minio, SeaweedFS, and Tencent COS
\ "s3"
5 / Backblaze B2
\ "b2"
6 / Better checksums for other remotes
\ "hasher"
7 / Box
\ "box"
8 / Cache a remote
\ "cache"
9 / Citrix Sharefile
\ "sharefile"
10 / Compress a remote
\ "compress"
11 / Dropbox
\ "dropbox"
12 / Encrypt/Decrypt a remote
\ "crypt"
13 / Enterprise File Fabric
\ "filefabric"
14 / FTP Connection
\ "ftp"
15 / Google Cloud Storage (this is not Google Drive)
\ "google cloud storage"
16 / Google Drive
\ "drive"
17 / Google Photos
\ "google photos"
18 / Hadoop distributed file system
\ "hdfs"
19 / Hubic
\ "hubic"
20 / In memory object storage system.
\ "memory"
21 / Jottacloud
\ "jottacloud"
22 / Koofr
\ "koofr"
23 / Local Disk
\ "local"
24 / Mail.ru Cloud
\ "mailru"
25 / Mega
\ "mega"
26 / Microsoft Azure Blob Storage
\ "azureblob"
27 / Microsoft OneDrive
\ "onedrive"
28 / OpenDrive
\ "opendrive"
29 / OpenStack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
\ "swift"
30 / Pcloud
\ "pcloud"
31 / Put.io
\ "putio"
32 / QingCloud Object Storage
\ "qingstor"
33 / SSH/SFTP Connection
\ "sftp"
34 / Sia Decentralized Cloud
\ "sia"
35 / Sugarsync
\ "sugarsync"
36 / Tardigrade Decentralized Cloud Storage
\ "tardigrade"
37 / Transparently chunk/split large files
\ "chunker"
38 / Union merges the contents of several upstream fs
\ "union"
39 / Uptobox
\ "uptobox"
40 / Webdav
\ "webdav"
41 / Yandex Disk
\ "yandex"
42 / Zoho
\ "zoho"
43 / http Connection
\ "http"
44 / premiumize-me (changed because of link)
\ "premiumizeme"
45 / seafile
\ "seafile"
Storage> 27
2022/01/03 18:39:07 DEBUG : onedrive: config in: state="*all", result=""
2022/01/03 18:39:07 DEBUG : onedrive: config out: out=&{State:*all-set,0,false Option: OAuth: Error: Result:}, err=
2022/01/03 18:39:07 DEBUG : onedrive: config: reading config parameter "client_id"
Option client_id.
OAuth Client Id.
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_id>
2022/01/03 18:39:14 DEBUG : onedrive: config in: state="*all-set,0,false", result=""
2022/01/03 18:39:14 DEBUG : onedrive: config out: out=&{State:*all,1,false Option: OAuth: Error: Result:}, err=
2022/01/03 18:39:14 DEBUG : onedrive: config in: state="*all,1,false", result=""
2022/01/03 18:39:14 DEBUG : onedrive: config out: out=&{State:*all-set,1,false Option: OAuth: Error: Result:}, err=
2022/01/03 18:39:14 DEBUG : onedrive: config: reading config parameter "client_secret"
Option client_secret.
OAuth Client Secret.
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret>
2022/01/03 18:39:19 DEBUG : onedrive: config in: state="*all-set,1,false", result=""
2022/01/03 18:39:19 DEBUG : onedrive: config out: out=&{State:*all,2,false Option: OAuth: Error: Result:}, err=
2022/01/03 18:39:19 DEBUG : onedrive: config in: state="*all,2,false", result=""
2022/01/03 18:39:19 DEBUG : onedrive: config out: out=&{State:*all,3,false Option: OAuth: Error: Result:}, err=
2022/01/03 18:39:19 DEBUG : onedrive: config in: state="*all,3,false", result=""
2022/01/03 18:39:19 DEBUG : onedrive: config out: out=&{State:*all,4,false Option: OAuth: Error: Result:}, err=
2022/01/03 18:39:19 DEBUG : onedrive: config in: state="*all,4,false", result=""
2022/01/03 18:39:19 DEBUG : onedrive: config out: out=&{State:*all,5,false Option: OAuth: Error: Result:}, err=
2022/01/03 18:39:19 DEBUG : onedrive: config in: state="*all,5,false", result=""
2022/01/03 18:39:19 DEBUG : onedrive: config out: out=&{State:*all-set,5,false Option:global OAuth: Error: Result:}, err=
2022/01/03 18:39:19 DEBUG : onedrive: config: reading config parameter "region"
Option region.
Choose national cloud region for OneDrive.
Enter a string value. Press Enter for the default ("global").
Choose a number from below, or type in your own value.
1 / Microsoft Cloud Global
\ "global"
2 / Microsoft Cloud for US Government
\ "us"
3 / Microsoft Cloud Germany
\ "de"
4 / Azure and Office 365 operated by 21Vianet in China
\ "cn"
region> 3
2022/01/03 18:39:27 DEBUG : onedrive: config in: state="*all-set,5,false", result="de"
2022/01/03 18:39:27 DEBUG : Saving config "region" in section "onedrive" of the config file
2022/01/03 18:39:27 DEBUG : onedrive: config out: out=&{State:*all,6,false Option: OAuth: Error: Result:}, err=
2022/01/03 18:39:27 DEBUG : onedrive: config in: state="*all,6,false", result=""
2022/01/03 18:39:27 DEBUG : onedrive: config out: out=&{State:*all,7,false Option: OAuth: Error: Result:}, err=
2022/01/03 18:39:27 DEBUG : onedrive: config in: state="*all,7,false", result=""
2022/01/03 18:39:27 DEBUG : onedrive: config out: out=&{State:*all,8,false Option: OAuth: Error: Result:}, err=
2022/01/03 18:39:27 DEBUG : onedrive: config in: state="*all,8,false", result=""
2022/01/03 18:39:27 DEBUG : onedrive: config out: out=&{State:*all,9,false Option: OAuth: Error: Result:}, err=
2022/01/03 18:39:27 DEBUG : onedrive: config in: state="*all,9,false", result=""
2022/01/03 18:39:27 DEBUG : onedrive: config out: out=&{State:*all,10,false Option: OAuth: Error: Result:}, err=
2022/01/03 18:39:27 DEBUG : onedrive: config in: state="*all,10,false", result=""
2022/01/03 18:39:27 DEBUG : onedrive: config out: out=&{State:*all,11,false Option: OAuth: Error: Result:}, err=
2022/01/03 18:39:27 DEBUG : onedrive: config in: state="*all,11,false", result=""
2022/01/03 18:39:27 DEBUG : onedrive: config out: out=&{State:*all,12,false Option: OAuth: Error: Result:}, err=
2022/01/03 18:39:27 DEBUG : onedrive: config in: state="*all,12,false", result=""
2022/01/03 18:39:27 DEBUG : onedrive: config out: out=&{State:*all,13,false Option: OAuth: Error: Result:}, err=
2022/01/03 18:39:27 DEBUG : onedrive: config in: state="*all,13,false", result=""
2022/01/03 18:39:27 DEBUG : onedrive: config out: out=&{State:*all,14,false Option: OAuth: Error: Result:}, err=
2022/01/03 18:39:27 DEBUG : onedrive: config in: state="*all,14,false", result=""
2022/01/03 18:39:27 DEBUG : onedrive: config out: out=&{State:*all,15,false Option: OAuth: Error: Result:}, err=
2022/01/03 18:39:27 DEBUG : onedrive: config in: state="*all,15,false", result=""
2022/01/03 18:39:27 DEBUG : onedrive: config out: out=&{State:*all,16,false Option: OAuth: Error: Result:}, err=
2022/01/03 18:39:27 DEBUG : onedrive: config in: state="*all,16,false", result=""
2022/01/03 18:39:27 DEBUG : onedrive: config out: out=&{State:*all,17,false Option: OAuth: Error: Result:}, err=
2022/01/03 18:39:27 DEBUG : onedrive: config in: state="*all,17,false", result=""
2022/01/03 18:39:27 DEBUG : onedrive: config out: out=&{State:*all-advanced Option:false OAuth: Error: Result:}, err=
2022/01/03 18:39:27 DEBUG : onedrive: config: reading config parameter "config_fs_advanced"
Edit advanced config?
y) Yes
n) No (default)
y/n>
2022/01/03 18:39:34 DEBUG : onedrive: config in: state="*all-advanced", result="false"
2022/01/03 18:39:34 DEBUG : onedrive: config out: out=&{State:*postconfig Option: OAuth: Error: Result:}, err=
2022/01/03 18:39:34 DEBUG : onedrive: config in: state="*postconfig", result=""
2022/01/03 18:39:34 DEBUG : onedrive: config in: state="", result=""
2022/01/03 18:39:34 DEBUG : onedrive: config out: out=&{State:*oauth,choose_type,, Option: OAuth: Error: Result:}, err=
2022/01/03 18:39:34 DEBUG : onedrive: config out: out=&{State:*oauth,choose_type,, Option: OAuth: Error: Result:}, err=
2022/01/03 18:39:34 DEBUG : onedrive: config in: state="*oauth,choose_type,,", result=""
2022/01/03 18:39:34 DEBUG : onedrive: config out: out=&{State:*oauth-confirm,choose_type,, Option: OAuth: Error: Result:}, err=
2022/01/03 18:39:34 DEBUG : onedrive: config in: state="*oauth-confirm,choose_type,,", result=""
2022/01/03 18:39:34 DEBUG : onedrive: config out: out=&{State:*oauth-islocal,choose_type,, Option:true OAuth: Error: Result:}, err=
2022/01/03 18:39:34 DEBUG : onedrive: config: reading config parameter "config_is_local"
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>
2022/01/03 18:39:38 DEBUG : onedrive: config in: state="*oauth-islocal,choose_type,,", result="true"
2022/01/03 18:39:38 DEBUG : onedrive: config out: out=&{State:*oauth-do,choose_type,, Option: OAuth: Error: Result:}, err=
2022/01/03 18:39:38 DEBUG : onedrive: config in: state="*oauth-do,choose_type,,", result=""
2022/01/03 18:39:38 DEBUG : Starting auth server on 127.0.0.1:53682
2022/01/03 18:39:38 NOTICE: If your browser doesn't open automatically go to the following link: http(link changed)://127.0.0.1:53682/auth?state=96KcvqB9y-v9PUQaZFUYXw
2022/01/03 18:39:38 NOTICE: Log in and authorize rclone for access
2022/01/03 18:39:38 NOTICE: Waiting for code...
2022/01/03 18:39:38 DEBUG : Redirecting browser to: https(link changed)://login.microsoftonline.de/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+offline_access+Sites.Read.All&state=96KcvqB9y-v9PUQaZFUYXw
^C
\\

Before I pressed CTRL-C to abort, the Windows-Account Window was opened in the Firefox browser, not the Office 365 account login window.

Remark: I inserted the text "(link changed)" text into the links to avoid too much links.

hello and welcome to the forum,

the looks correct, to authorize rclone to use onedrive,
you need to login using your email account.

i think perhaps you are getting confused,
the windows login account has nothing to do with setting up rclone.
tho you might use the same email address for both.

and firefox has nothing to do with your windows login.
so in firefox, just login to your email account and that authorizes rclone to work.

Hi, asdffdsa and thanks for your reply.

Rclone calls a Windows login window in Firefox. If I am trying to login with my Microsoft 365 email account, then i got the following answer in the login window(translated from german to english):

„REDACT_de is not in our system. Ensure, you have been written the name correctly.“

The called login window (firefox) is:

https_//login.microsoftonline.de/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+offline_access+Sites.Read.All&state=zdG9CDiDrklJHfWn922chA

Also I deactivated the firewall temporarily: same behavior.

If I call Office_com by firefox directly and click at the login button, then the following Site is called:

https_//login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=4765445b-32c6-49b0-83e6-1d93765276ca&redirect_uri=https%3A%2F%2Fwww.office.com%2Flandingv2&response_type=code%20id_token&scope=openid%20profile%20https%3A%2F%2Fwww.office.com%2Fv2%2FOfficeHome.All&response_mode=form_post&nonce=637768913762698580.MmRmYjY4MGYtMDQ3MC00YmQyLTllY2YtYTQ0YWRjOTM0ZjdjZjEwNDhjZGMtMzY3MS00ZDE3LThlNTYtYzBmZDk5NWRhNDRk&ui_locales=de&mkt=de&client-request-id=993b6650-fa58-4eeb-b209-c6310f3dc5af&state=lUHvlncN_SIKFpkUHiQBRwzIvpfTQ4jtrvYhjDqH0PVI5LJB7R6z-oVWQznLTnOdT8wsTVei8ABU9VlA_lJNIsXfvslJZzgzL26gs6jR14UsWEsY-tmA2IZoSZt24d3JBNl7JTNutUCfM4cxUL61mYDJ5PnunrNh2Gldxc6aSsE9YYlBI4wguENW7FaozxnxpRpOVKvtz5uAqXGr-5hjgumuD4rtJLouRlptJfx1aj3dcYUt9jzHt7_uxhldP5SEXUT6062Gi2m6RDjJ8YIrZ9t33s5gfK7q1fN0SxvVhbc&x-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.12.1.0

Here is my Microsoft 365 email account known and I can login to Office_com with my email account. Afterwards I have the full functionality of my tenant in Microsoft 365.

Remark: Substituted the ":" with "_" at the beginning of the https lines, also some "." in domain names. So you can check the code.

Hi,

does anybody has an idea, what's going wrong in the authorization procedure, described in my posts?

Unfortunately I got no answer to my last post.

Best regards

Mbob

I have made some analyze work.

If I login at Microsoft 365 by the office.com website, then login.microsoftonline.com is used. See my post above.

But rclone itself creates a login request which points to login.microsoftonline.de. If I put that login address into Firefox manually, I run into a security issue, messaged by Firefox itself.

It looks like, that login.microsoftonline.de causes the issues.

So I tried to change the rclone request from login.microsoftonline.de to login.microsoftonline.com in the address line in Firefox manually and I could login successfully. Afterwards Rlog ran into issues, perhaps, I ran it without ID an secret. So I have to do another try.

I ran those tests with deativated Firefox Addons and deactivated firewall.

Here is the bash output:

:~> rclone config
No remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
name> onedrive
Option Storage.
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value.
1 / 1Fichier
\ "fichier"
2 / Alias for an existing remote
\ "alias"
3 / Amazon Drive
\ "amazon cloud drive"
4 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, Digital Ocean, Dreamhost, IBM COS, Minio, SeaweedFS, and Tencent COS
\ "s3"
5 / Backblaze B2
\ "b2"
6 / Better checksums for other remotes
\ "hasher"
7 / Box
\ "box"
8 / Cache a remote
\ "cache"
9 / Citrix Sharefile
\ "sharefile"
10 / Compress a remote
\ "compress"
11 / Dropbox
\ "dropbox"
12 / Encrypt/Decrypt a remote
\ "crypt"
13 / Enterprise File Fabric
\ "filefabric"
14 / FTP Connection
\ "ftp"
15 / Google Cloud Storage (this is not Google Drive)
\ "google cloud storage"
16 / Google Drive
\ "drive"
17 / Google Photos
\ "google photos"
18 / Hadoop distributed file system
\ "hdfs"
19 / Hubic
\ "hubic"
20 / In memory object storage system.
\ "memory"
21 / Jottacloud
\ "jottacloud"
22 / Koofr
\ "koofr"
23 / Local Disk
\ "local"
24 / Mail.ru Cloud
\ "mailru"
25 / Mega
\ "mega"
26 / Microsoft Azure Blob Storage
\ "azureblob"
27 / Microsoft OneDrive
\ "onedrive"
28 / OpenDrive
\ "opendrive"
29 / OpenStack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
\ "swift"
30 / Pcloud
\ "pcloud"
31 / Put.io
\ "putio"
32 / QingCloud Object Storage
\ "qingstor"
33 / SSH/SFTP Connection
\ "sftp"
34 / Sia Decentralized Cloud
\ "sia"
35 / Sugarsync
\ "sugarsync"
36 / Tardigrade Decentralized Cloud Storage
\ "tardigrade"
37 / Transparently chunk/split large files
\ "chunker"
38 / Union merges the contents of several upstream fs
\ "union"
39 / Uptobox
\ "uptobox"
40 / Webdav
\ "webdav"
41 / Yandex Disk
\ "yandex"
42 / Zoho
\ "zoho"
43 / http Connection
\ "http"
44 / premiumize.me
\ "premiumizeme"
45 / seafile
\ "seafile"
Storage> 27
Option client_id.
OAuth Client Id.
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_id>
Option client_secret.
OAuth Client Secret.
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret>
Option region.
Choose national cloud region for OneDrive.
Enter a string value. Press Enter for the default ("global").
Choose a number from below, or type in your own value.
1 / Microsoft Cloud Global
\ "global"
2 / Microsoft Cloud for US Government
\ "us"
3 / Microsoft Cloud Germany
\ "de"
4 / Azure and Office 365 operated by 21Vianet in China
\ "cn"
region> 3
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>
2022/01/10 18:52:05 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=bmLgKlj5NtnfeZiaALLhnw
2022/01/10 18:52:05 NOTICE: Log in and authorize rclone for access
2022/01/10 18:52:05 NOTICE: Waiting for code...
2022/01/10 18:59:32 NOTICE: Got code
Error: failed to get token: oauth2: cannot fetch token: 400 Bad Request
Response: {"error":"invalid_grant","error_description":"AADSTS90051: Invalid Delegation Token. Invalid national Cloud ID (0) is specified.\r\nTrace ID: c07d11b6-32b7-4687-b70a-d7a148476100\r\nCorrelation ID: 1aa3b706-75a2-4b53-bb6d-b4ec53f7f55d\r\nTimestamp: 2022-01-10 17:59:33Z",
"error_codes":[90051],"timestamp":"2022-01-10 17:59:33Z","trace_id":"c07d11b6-32b7-4687-b70a-d7a148476100","correlation_id":"1aa3b706-75a2-4b53-bb6d-b4ec53f7f55d"}
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.

2022/01/10 18:59:33 Fatal error: failed to get token: oauth2: cannot fetch token: 400 Bad Request
Response: {"error":"invalid_grant","error_description":"AADSTS90051: Invalid Delegation Token. Invalid national Cloud ID (0) is specified.\r\nTrace ID: c07d11b6-32b7-4687-b70a-d7a148476100\r\nCorrelation ID: 1aa3b706-75a2-4b53-bb6d-b4ec53f7f55d\r\nTimestamp: 2022-01-10 17:59:33Z",
"error_codes":[90051],"timestamp":"2022-01-10 17:59:33Z","trace_id":"c07d11b6-32b7-4687-b70a-d7a148476100","correlation_id":"1aa3b706-75a2-4b53-bb6d-b4ec53f7f55d"}

It's a known issue, see:

Cannot configure OneDrive via wizard: error returned immediately when opening auth url using Firefox · Issue #5836 · rclone/rclone (github.com)

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