Unable to login to onedrive as student

What is the problem you are having with rclone?

rclone is redirecting me to this site if I press Microsoft Cloud Germany
login.microsoftonline(dot)de however this site doesnt work for students. If I use my credentials on this site, it says mail not found.
Students are only able to login through this site: onedrive.live(dot)com/about/en-us/signin/.

So it would be nice if you could add this site on the onedrive config

What is your rclone version (output from rclone version)

rclone v1.56.0

Which OS you are using and how many bits (eg Windows 7, 64 bit)

  • os/version: arch rolling (64 bit)
  • os/kernel: 5.13.10-arch1-1 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.16.6
  • go/linking: dynamic
  • go/tags: none

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

onedrive

A log from the command

2021/08/17 23:47:52 NOTICE: Log in and authorize rclone for access
2021/08/17 23:47:52 NOTICE: Waiting for code...

Its waiting for the code because it is redirecting me to the wrong onedrive site "login.microsoftonline(dot)de".
However as a student in germany I am only able to login through this site: "onedrive.live(dot)com/about/en-us/signin/."

hello and welcome to the forum,

can you post the entire rclone config text, not just a snippet.

I am sorry. Sure!

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> n
name> onedrive
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 / Box
   \ "box"
 7 / Cache a remote
   \ "cache"
 8 / Citrix Sharefile
   \ "sharefile"
 9 / Compress a remote
   \ "compress"
10 / Dropbox
   \ "dropbox"
11 / Encrypt/Decrypt a remote
   \ "crypt"
12 / Enterprise File Fabric
   \ "filefabric"
13 / FTP Connection
   \ "ftp"
14 / Google Cloud Storage (this is not Google Drive)
   \ "google cloud storage"
15 / Google Drive
   \ "drive"
16 / Google Photos
   \ "google photos"
17 / Hadoop distributed file system
   \ "hdfs"
18 / Hubic
   \ "hubic"
19 / In memory object storage system.
   \ "memory"
20 / Jottacloud
   \ "jottacloud"
21 / Koofr
   \ "koofr"
22 / Local Disk
   \ "local"
23 / Mail.ru Cloud
   \ "mailru"
24 / Mega
   \ "mega"
25 / Microsoft Azure Blob Storage
   \ "azureblob"
26 / Microsoft OneDrive
   \ "onedrive"
27 / OpenDrive
   \ "opendrive"
28 / OpenStack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
   \ "swift"
29 / Pcloud
   \ "pcloud"
30 / Put.io
   \ "putio"
31 / QingCloud Object Storage
   \ "qingstor"
32 / SSH/SFTP Connection
   \ "sftp"
33 / Sugarsync
   \ "sugarsync"
34 / Tardigrade Decentralized Cloud Storage
   \ "tardigrade"
35 / Transparently chunk/split large files
   \ "chunker"
36 / Union merges the contents of several upstream fs
   \ "union"
37 / Uptobox
   \ "uptobox"
38 / Webdav
   \ "webdav"
39 / Yandex Disk
   \ "yandex"
40 / Zoho
   \ "zoho"
41 / http Connection
   \ "http"
42 / premiumize.me
   \ "premiumizeme"
43 / seafile
   \ "seafile"
Storage> 26
OAuth Client Id
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_id> 
OAuth Client Secret
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret> 
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> 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> y
2021/08/18 01:04:15 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=ITyRdCfQKMwNMm8Vb0wH0A
2021/08/18 01:04:15 NOTICE: Log in and authorize rclone for access
2021/08/18 01:04:15 NOTICE: Waiting for code...

it redirects me to this site: login.microsoftonline(dot)de

However it is not possible to login on this site with a onedrive student account.

Its only possible to login through this site with my onedrive student account: "onedrive.live(dot)com/about/en-us/signin/." but this site isnt available on rclone.

i see the problem, no idea of a working solution.

tho i would try the folllwing and maybe get lucky..

once the website appears in the web browser, edit the url

  1. replace the login.microsoftonline.de with onedrive.live.com
  2. copy and paste that into a new tab
  3. login as normal and see what happens.

sadly it didn't work. I replaced it and logged in successfully however the terminal is still waiting for the code.

you kept the whole url, just changed the domain part?

I changed from ".de" to ".com" and now I can login. But I have another problem, it says

Description: Using application 'rclone' is currently not supported for your organization [YOUR_ORGANIZATION] because it is in an unmanaged state. An administrator needs to claim ownership of the company by DNS validation of [YOUR_ORGANIZATION] before the application rclone can be provisioned.

According to the rclone wiki I am still able to connect to my onedrive with webdav however I am still not sure how.
The main url of my student onedrive sharepoint looks like this:
https://xxx-my.sharepoint.com/personal/xxxx_students_uni-xxxx_de/_layouts/15/onedrive.aspx

I am not sure what should I choose as url?
And after choosing the url, should I use my student mail as user?

I tried this with webdav


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> n
name> onedrive
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 / Box                                                                                                                                                    
  \ "box"                                                                                                                                                  
7 / Cache a remote                                                                                                                                         
  \ "cache"                                                                                                                                                
8 / Citrix Sharefile                                                                                                                                       
  \ "sharefile"                                                                                                                                            
9 / Compress a remote                                                                                                                                      
  \ "compress"                                                                                                                                             
10 / Dropbox                                                                                                                                                
  \ "dropbox"                                                                                                                                              
11 / Encrypt/Decrypt a remote                                                                                                                               
  \ "crypt"                                                                                                                                                
12 / Enterprise File Fabric                                                                                                                                 
  \ "filefabric"                                                                                                                                           
13 / FTP Connection                                                                                                                                         
  \ "ftp"                                                                                                                                                  
14 / Google Cloud Storage (this is not Google Drive)                                                                                                        
  \ "google cloud storage"                                                                                                                                 
15 / Google Drive                                                                                                                                           
  \ "drive"                                                                                                                                                
16 / Google Photos                                                                                                                                          
  \ "google photos"                                                                                                                                        
17 / Hadoop distributed file system                                                                                                                         
  \ "hdfs"                                                                                                                                                 
18 / Hubic                                                                                                                                                  
  \ "hubic"                                                                                                                                                
19 / In memory object storage system.                                                                                                                       
  \ "memory"                                                                                                                                               
20 / Jottacloud                                                                                                                                             
  \ "jottacloud"                                                                                                                                           
21 / Koofr                                                                                                                                                  
  \ "koofr"                                                                                                                                                
22 / Local Disk                                                                                                                                             
  \ "local"                                                                                                                                                
23 / Mail.ru Cloud                                                                                                                                          
  \ "mailru"                                                                                                                                               
24 / Mega                                                                                                                                                   
  \ "mega"                                                                                                                                                 
25 / Microsoft Azure Blob Storage                                                                                                                           
  \ "azureblob"                                                                                                                                            
26 / Microsoft OneDrive                                                                                                                                     
  \ "onedrive"                                                                                                                                             
27 / OpenDrive                                                                                                                                              
  \ "opendrive"                                                                                                                                            
28 / OpenStack Swift (Rackspace Cloud Files, Memset Memstore, OVH)                                                                                          
  \ "swift"                                                                                                                                                
29 / Pcloud                                                                                                                                                 
  \ "pcloud"                                                                                                                                               
30 / Put.io                                                                                                                                                 
  \ "putio"                                                                                                                                                
31 / QingCloud Object Storage                                                                                                                               
  \ "qingstor"                                                                                                                                             
32 / SSH/SFTP Connection                                                                                                                                    
  \ "sftp"                                                                                                                                                 
33 / Sugarsync                                                                                                                                              
  \ "sugarsync"                                                                                                                                            
34 / Tardigrade Decentralized Cloud Storage                                                                                                                 
  \ "tardigrade"                                                                                                                                           
35 / Transparently chunk/split large files                                                                                                                  
  \ "chunker"                                                                                                                                              
36 / Union merges the contents of several upstream fs                                                                                                       
  \ "union"                                                                                                                                                
37 / Uptobox                                                                                                                                                
  \ "uptobox"                                                                                                                                              
38 / Webdav                                                                                                                                                 
  \ "webdav"                                                                                                                                               
39 / Yandex Disk                                                                                                                                            
  \ "yandex"                                                                                                                                               
40 / Zoho                                                                                                                                                   
  \ "zoho"                                                                                                                                                 
41 / http Connection                                                                                                                                        
  \ "http"                                                                                                                                                 
42 / premiumize.me                                                                                                                                          
  \ "premiumizeme"                                                                                                                                         
43 / seafile                                                                                                                                                
  \ "seafile"                                                                                                                                              
Storage> webdav                                                                                                                                             
URL of http host to connect to
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
1 / Connect to example.com
  \ "https://example.com"                                                                                                                                  
url> https://xxxx-my.sharepoint.com/personal/xxxx_students_uni-xxxx_de/_layouts/15/onedrive.aspx                                      
Name of the Webdav site/service/software you are using
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
1 / Nextcloud
  \ "nextcloud"                                                                                                                                            
2 / Owncloud                                                                                                                                               
  \ "owncloud"                                                                                                                                             
3 / Sharepoint Online, authenticated by Microsoft account.                                                                                                 
  \ "sharepoint"                                                                                                                                           
4 / Sharepoint with NTLM authentication. Usually self-hosted or on-premises.                                                                               
  \ "sharepoint-ntlm"                                                                                                                                      
5 / Other site/service or software                                                                                                                         
  \ "other"                                                                                                                                                
vendor> 3                                                                                                                                                   
User name. In case NTLM authentication is used, the username should be in the format 'Domain\User'.
Enter a string value. Press Enter for the default ("").
user> xxxx@students.uni-xxxx.de
Password.
y) Yes type in my own password
g) Generate random password
n) No leave this optional password blank (default)
y/g/n> y
Enter the password:
password:
Confirm the password:
password:
Bearer token instead of user/pass (e.g. a Macaroon)
Enter a string value. Press Enter for the default ("").
bearer_token>
Edit advanced config?
y) Yes
n) No (default)
y/n>
--------------------
[onedrive]
type = webdav
url = https://xxxx-my.sharepoint.com/personal/xxxx_students_uni-xxxx_de/_layouts/15/onedrive.aspx
vendor = sharepoint
user = xxxx@students.uni-xxxx.de
pass = *** ENCRYPTED ***
--------------------
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d>
Current remotes:

Name                 Type
====                 ====
gdrive               drive
onedrive             webdav

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> q
[brkn@archlin ~]$ rclone lsd onedrive:
2021/08/18 05:43:36 ERROR : : error listing: directory not found
2021/08/18 05:43:36 Failed to lsd with 2 errors: last error was: directory not found
[brkn@archlin ~]$ rclone ls onedrive:
2021/08/18 05:43:43 ERROR : : error listing: directory not found
2021/08/18 05:43:43 Failed to ls with 2 errors: last error was: directory not found

I also tried this one with "5 / Other site/service or software
\ "other". I get the same error.

good, my trick worked.

about that message, seems that the onedrive account is locked down,needs to tweak permissions to allow rclone to connect, that this is not a rclone issue.

and if you search the forum,
https://github.com/rclone/rclone/issues/1975

and if you search the internet for that message, it is a common issue with onedrive.

i was able to access sharepoint using webdav

Storage> webdav
URL of http host to connect to
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
 1 / Connect to example.com
   \ "https://example.com"
url> https://xxx.sharepoint.com
Name of the Webdav site/service/software you are using
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
 1 / Nextcloud
   \ "nextcloud"
 2 / Owncloud
   \ "owncloud"
 3 / Sharepoint Online, authenticated by Microsoft account.
   \ "sharepoint"
 4 / Sharepoint with NTLM authentication. Usually self-hosted or on-premises.
   \ "sharepoint-ntlm"
 5 / Other site/service or software
   \ "other"
vendor> 3
User name. In case NTLM authentication is used, the username should be in the format 'Domain\User'.
Enter a string value. Press Enter for the default ("").
user> xxx@xxx.xxx
Password.
y) Yes type in my own password
g) Generate random password
n) No leave this optional password blank (default)
y/g/n> y
Enter the password:
password:
Confirm the password:
password:
Bearer token instead of user/pass (e.g. a Macaroon)
Enter a string value. Press Enter for the default ("").
bearer_token>
Edit advanced config?
y) Yes
n) No (default)
y/n>
--------------------
[sdav]
type = webdav
url = https://xxx.sharepoint.com
vendor = sharepoint
user = xxx@xxx.net
pass = *** ENCRYPTED ***
rclone lsd sdav:
          -1 2021-02-17 13:53:48        -1 FormServerTemplates
          -1 2021-02-17 13:53:48        -1 IWConvertedForms
          -1 2021-02-07 01:30:17        -1 Lists
          -1 2021-02-07 01:30:27        -1 Shared Documents
          -1 2021-02-07 01:30:28        -1 SitePages
          -1 2021-02-07 01:30:19        -1 Style Library
          -1 2021-02-07 01:30:17        -1 _catalogs
          -1 2021-02-07 01:30:17        -1 _cts
          -1 2021-02-07 01:30:16        -1 _private
          -1 2021-02-07 01:30:16        -1 images

Okay, I think I got it. But now I have this error. "405 Method Not Allowed"


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> n
name> onedrive
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 / Box                                                                                                                                                    
  \ "box"                                                                                                                                                  
7 / Cache a remote                                                                                                                                         
  \ "cache"                                                                                                                                                
8 / Citrix Sharefile                                                                                                                                       
  \ "sharefile"                                                                                                                                            
9 / Compress a remote                                                                                                                                      
  \ "compress"                                                                                                                                             
10 / Dropbox                                                                                                                                                
  \ "dropbox"                                                                                                                                              
11 / Encrypt/Decrypt a remote                                                                                                                               
  \ "crypt"                                                                                                                                                
12 / Enterprise File Fabric                                                                                                                                 
  \ "filefabric"                                                                                                                                           
13 / FTP Connection                                                                                                                                         
  \ "ftp"                                                                                                                                                  
14 / Google Cloud Storage (this is not Google Drive)                                                                                                        
  \ "google cloud storage"                                                                                                                                 
15 / Google Drive                                                                                                                                           
  \ "drive"                                                                                                                                                
16 / Google Photos                                                                                                                                          
  \ "google photos"                                                                                                                                        
17 / Hadoop distributed file system                                                                                                                         
  \ "hdfs"                                                                                                                                                 
18 / Hubic                                                                                                                                                  
  \ "hubic"                                                                                                                                                
19 / In memory object storage system.                                                                                                                       
  \ "memory"                                                                                                                                               
20 / Jottacloud                                                                                                                                             
  \ "jottacloud"                                                                                                                                           
21 / Koofr                                                                                                                                                  
  \ "koofr"                                                                                                                                                
22 / Local Disk                                                                                                                                             
  \ "local"                                                                                                                                                
23 / Mail.ru Cloud                                                                                                                                          
  \ "mailru"                                                                                                                                               
24 / Mega                                                                                                                                                   
  \ "mega"                                                                                                                                                 
25 / Microsoft Azure Blob Storage                                                                                                                           
  \ "azureblob"                                                                                                                                            
26 / Microsoft OneDrive                                                                                                                                     
  \ "onedrive"                                                                                                                                             
27 / OpenDrive                                                                                                                                              
  \ "opendrive"                                                                                                                                            
28 / OpenStack Swift (Rackspace Cloud Files, Memset Memstore, OVH)                                                                                          
  \ "swift"                                                                                                                                                
29 / Pcloud                                                                                                                                                 
  \ "pcloud"                                                                                                                                               
30 / Put.io                                                                                                                                                 
  \ "putio"                                                                                                                                                
31 / QingCloud Object Storage                                                                                                                               
  \ "qingstor"                                                                                                                                             
32 / SSH/SFTP Connection                                                                                                                                    
  \ "sftp"                                                                                                                                                 
33 / Sugarsync                                                                                                                                              
  \ "sugarsync"                                                                                                                                            
34 / Tardigrade Decentralized Cloud Storage                                                                                                                 
  \ "tardigrade"                                                                                                                                           
35 / Transparently chunk/split large files                                                                                                                  
  \ "chunker"                                                                                                                                              
36 / Union merges the contents of several upstream fs                                                                                                       
  \ "union"                                                                                                                                                
37 / Uptobox                                                                                                                                                
  \ "uptobox"                                                                                                                                              
38 / Webdav                                                                                                                                                 
  \ "webdav"                                                                                                                                               
39 / Yandex Disk                                                                                                                                            
  \ "yandex"                                                                                                                                               
40 / Zoho                                                                                                                                                   
  \ "zoho"                                                                                                                                                 
41 / http Connection                                                                                                                                        
  \ "http"                                                                                                                                                 
42 / premiumize.me                                                                                                                                          
  \ "premiumizeme"                                                                                                                                         
43 / seafile                                                                                                                                                
  \ "seafile"                                                                                                                                              
Storage> webdav                                                                                                                                             
URL of http host to connect to
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
1 / Connect to example.com
  \ "https://example.com"                                                                                                                                  
url> https://xxxx-my.sharepoint.com/personal/xxxx/_layouts/15/onedrive.aspx?id=/personal/xxxx/Documents/
Name of the Webdav site/service/software you are using
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
1 / Nextcloud
  \ "nextcloud"                                                                                                                                            
2 / Owncloud                                                                                                                                               
  \ "owncloud"                                                                                                                                             
3 / Sharepoint Online, authenticated by Microsoft account.                                                                                                 
  \ "sharepoint"                                                                                                                                           
4 / Sharepoint with NTLM authentication. Usually self-hosted or on-premises.                                                                               
  \ "sharepoint-ntlm"                                                                                                                                      
5 / Other site/service or software                                                                                                                         
  \ "other"                                                                                                                                                
vendor> 3                                                                                                                                                   
User name. In case NTLM authentication is used, the username should be in the format 'Domain\User'.
Enter a string value. Press Enter for the default ("").
user> xxxx@xxxx.de
Password.
y) Yes type in my own password
g) Generate random password
n) No leave this optional password blank (default)
y/g/n> y
Enter the password:
password:
Confirm the password:
password:
Bearer token instead of user/pass (e.g. a Macaroon)
Enter a string value. Press Enter for the default ("").
bearer_token>
Edit advanced config?
y) Yes
n) No (default)
y/n>
--------------------
[onedrive]
type = webdav
url = https://xxxx-my.sharepoint.com/personal/xxxx/_layouts/15/onedrive.aspx?id=/personal/xxxx/Documents/
vendor = sharepoint
user = xxxx@xxxx.de
pass = *** ENCRYPTED ***
--------------------
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d>
Current remotes:

Name                 Type
====                 ====
gdrive               drive
onedrive             webdav

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> q
[brkn@archlin ~]$ rclone lsd onedrive:
2021/08/18 18:11:10 ERROR : : error listing: couldn't list files: 405 Method Not Allowed
2021/08/18 18:11:10 Failed to lsd with 2 errors: last error was: couldn't list files: 405 Method Not Allowed
[brkn@archlin ~]$ rclone lsl onedrive:
2021/08/18 18:12:30 ERROR : : error listing: couldn't list files: 405 Method Not Allowed
2021/08/18 18:12:30 Failed to lsl with 2 errors: last error was: couldn't list files: 405 Method Not Allowed


as far as i know, my personal/free onedrive account does not have sharepoint.
tho my paid for office365 account does have share point

perhaps edu accounts are different.
are you sure your account has sharepoint?

also, my url was simple, short and your url is very complex...

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