Create the admin link in ‘365 admin

Start rclone.
Choose to create a new remote
choose onedrive (type 31 35 at the time of writing)
We don’t have a client id or client secret yet so leave blank as per the defaults

at the end you can say No, to editing the advanced config. After that you should be offered the option to sign in via a browser. Do that and use your admin account.
Back in the command prompt, continuing the rclone setup..
For the config_type, choose number 6 (“Type in SiteID“)

Open up the admin link from earlier in your browser, and grab the site ID from the Sync button in the Onedrive web-folder view.
You can either see this in dev-tools in the network request history (chrome F12), or you can Copy library ID from the middle of the screen and extract it from the url there (that is easiest). It’s url-encoded but that’s fine. Just take everything after &siteId= up to the next &, so for example here is an extract from one I just did. We would want %7bea……..%7D:&siteId=%7Bea459e9b%2D37fd%2D44b5%2Da5f3%2D4434244cd813b%7D&webId=%7B86f7034

Type that in for your site ID in rclone.
Then rclone will find the OneDrive business drive and let you choose it (number 1 in the list below)

All good. Now you can sync it to your file server or whatever.
I use a scheduled task running rclone as below:
c:\rclone\rclone.exe -v --stats 30s copy james-onedrive: D:\OneDriveBackup\James --log-file=C:\Sharepoint-backup-log.txt
Comments (0)