Problem creating remote with SA and Shared Drive

What is the problem you are having with rclone?

I'm trying to create a remote with SA for my Shared Drive. Unfortunately, when I say that the remote will be "Configured as a Shared Drive (Team Drive)", I get the message that "No Shared Drives found in your account". If I create without the SA option, no error message appears.

Run the command 'rclone version' and share the full output of the command.

rclone v1.58.1

  • os/version: ubuntu 16.04
  • os/kernel: 4.9.160-armada375 (armv7l)
  • os/type: linux
  • os/arch: arm
  • go/version: go1.17.9
  • go/linking: static
  • go/tags: none

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

Shared Drive (Team Drive)

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

rclone config

The rclone config contents with secrets removed.

Storage> 17
Option client_id.
Google Application Client Id
Setting your own is recommended.
See for how to create your own.
If you leave this blank, it will use an internal key which is low performance.
Enter a value. Press Enter to leave empty.
client_id> (edited)
Option client_secret.
OAuth Client Secret.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_secret> GOCSPX-msFtpvbNfH8NabcDefGhiJ0euEco  (edited)
Option scope.
Scope that rclone should use when requesting access from drive.
Choose a number from below, or type in your own value.
Press Enter to leave empty.
 1 / Full access all files, excluding Application Data Folder.
   \ (drive)
 2 / Read-only access to file metadata and file contents.
   \ (drive.readonly)
   / Access to files created by rclone only.
 3 | These are visible in the drive website.
   | File authorization is revoked when the user deauthorizes the app.
   \ (drive.file)
   / Allows read and write access to the Application Data folder.
 4 | This is not visible in the drive website.
   \ (drive.appfolder)
   / Allows read-only access to file metadata but
 5 | does not allow any access to read or download file content.
   \ (drive.metadata.readonly)
scope> 1
Option root_folder_id.
ID of the root folder.
Leave blank normally.
Fill in to access "Computers" folders (see docs), or for rclone to use
a non root folder as its starting point.
Enter a value. Press Enter to leave empty.
Option service_account_file.
Service Account Credentials JSON file path.
Leave blank normally.
Needed only if you want use SA instead of interactive login.
Leading `~` will be expanded in the file name as will environment variables such as `${RCLONE_CONFIG_DIR}`.
Enter a value. Press Enter to leave empty.
service_account_file> /home/kdantas/sa-json/enterprise01.json
Edit advanced config?
y) Yes
n) No (default)
Configure this as a Shared Drive (Team Drive)?

y) Yes
n) No (default)
y/n> y
No Shared Drives found in your account
type = drive
client_id =
client_secret = GOCSPX-msFtpvbNfH8NabcDefGhiJ0euEco
scope = drive
service_account_file = /home/kdantas/sa-json/enterprise01.json
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote

I'd imagine the issue is how you created you SA account and what permissions you gave it.

Did you add the SA account to the shared drive?

When using the SA account, you don't need a client ID/password either as the SA takes care of that.

Hey @Animosity022, thank you very much. After your words, I was finally able to get Service Accounts up and running. Now I just need a script to switch between service accounts when it reaches a transfer limit pre determined by me. If you know anything about these scripts, I welcome suggestions. Once again, thank you very much. By the way, how do I close a post started by me?

You can use a normal remote like;

type = drive
client_id = <your normal user>
client_secret = <your normal user>
scope = drive
token = {"access_token.... 
team_drive = id (its visible in the url)

copy paste your normal remote and

than call your rclone script with the following option;

--drive-service-account-file "service account file"

So you can access the shared drive with your normal user and x Service Accounts.
To verify that the file is added by a SA, open your drive in your browser, look at the details, and verify that the SA changed the file.

Furthermore add all SA accounts to a group and add this group to the shared drive.

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