教育邮箱直接申请而无管理员的Onedrive For Business由于没有管理员批准使用第三方API,所以Rclone无法使用常规方式挂载OFB。

官方提供了使用Webdav的方式挂载OFB,操作如下:

  1. 首先,打开office.com,登陆并打开onedrive,获取网址,你的网址应该长成这个样子:
    https://[YOUR-DOMAIN]-my.sharepoint.com/personal/[YOUR-EMAIL]/_layouts/15/onedrive.aspx
  2. 然后把这个网址改成这个样子,备用:
    https://[YOUR-DOMAIN]-my.sharepoint.com/personal/[YOUR-EMAIL]/Documents
  3. 回到Rclone,在VPS上运行rclone config,并选择Webdav模式,输入2中获取的链接;
  4. 然后会弹出来几种Webdav的选择,这里选择sharepoint,下一步;
  5. user>中输入邮箱地址,在pass>后面输入密码(密码不可见);
  6. 剩下的配置默认即可。

来看一下官方的文档吧:

Sharepoint
Rclone can be used with Sharepoint provided by OneDrive for Business or Office365 Education Accounts. This feature is only needed for a few of these Accounts, mostly Office365 Education ones. These accounts are sometimes not verified by the domain owner github#1975

This means that these accounts can’t be added using the official API (other Accounts should work with the “onedrive” option). However, it is possible to access them using webdav.

To use a sharepoint remote with rclone, add it like this: First, you need to get your remote’s URL:

Go here to open your OneDrive or to sign in
Now take a look at your address bar, the URL should look like this:
https://[YOUR-DOMAIN]-my.sharepoint.com/personal/[YOUR-EMAIL]/_layouts/15/onedrive.aspx
You’ll only need this URL upto the email address. After that, you’ll most likely want to add /Documents. That subdirectory contains the actual data stored on your OneDrive.

Add the remote to rclone like this: Configure the url as https://[YOUR-DOMAIN]-my.sharepoint.com/personal/[YOUR-EMAIL]/Documents and use your normal account email and password for user and pass. If you have 2FA enabled, you have to generate an app password. Set the vendor to sharepoint.

Your config file should look like this:

[sharepoint]
type = webdav
url = https://[YOUR-DOMAIN]-my.sharepoint.com/personal/[YOUR-EMAIL]/Documents
vendor = other
user = YourEmailAddress
pass = encryptedpassword