What is the problem you are having with rclone?
It is not obvious how to setup a remote with access to Microsoft Teams Drives, as the following questions demonstrate. This post documents how I solved these issues.
https://forum.rclone.org/t/microsoft-teams-data-sync/21554
https://forum.rclone.org/t/teamsharepoint-sync/21546
https://emailwsu.sharepoint.com/teams/Physics.450/Shared%20Documents
(The "bug" is with the Forum settings: Topics expire after 60 days, so I can't post a complete answer on those questions, or link to appropriate answers. There is a discussion about this on the Discourse Meta site.)
Solution
What worked for me was to use the "search" option after authenticating via running the rclone authorize "onedrive"
on a different computer were I was logged in to my Teams account. rclone configure
went like this:
$ rclone config
...
name> ms_myteam
...
Storage> onedrive
... # Blank client_id and client_secret. No advanced config.
Remote config...
y/n> n
For this to work, you will need rclone available on a machine that has a web browser available.
Execute the following on your machine:
rclone authorize "onedrive"
Then paste the result below: # Not sure when this will expire with MFA
result> {"access_token":..}
Choose a number from below, or type in an existing value
1 / OneDrive Personal or Business
\ "onedrive"
2 / Root Sharepoint site
\ "sharepoint"
3 / Type in driveID
\ "driveid"
4 / Type in SiteID
\ "siteid"
5 / Search a Sharepoint site
\ "search"
Your choice> 5 # This was the key. Then search for something in you teams
What to search for> MyTeam # NOTE: Don't use spaces here!
Found 2 sites, please select the one you want to use:
0: MyTeam (https://...sharepoint.com/teams/MYTEAM)...
...
Chose drive to use:> 0
Found 4 drives, please select the one you want to use:
0: Class Files (documentLibrary)...
1: Class Materials (documentLibrary)...
2: Documents (documentLibrary)...
...
Chose drive to use:> 2
Found drive 'root' of type 'documentLibrary', URL: https://...sharepoint.com/teams/MYTEAM/Shared%20Documents
Is that okay?
y) Yes
n) No
y/n> y
I can then see everything in the team:
$ rclone ls ms_myteam:
1864257 General/Videos/...
...
I am not sure how long this token will work as our organization uses MFA with a short time-out period. Does anyone have experience with this?
s$ rclone --version
rclone v1.48.0
- os/arch: linux/amd64
- go version: go1.12.6
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Linux (Ubuntu 20.04LTS)
Which cloud storage system are you using? (eg Google Drive)
Microsoft Teams through OneDrive