500 error when trying to add via service account


#1

Failed to configure team drive: list team drives failed: googleapi: Error 500: Internal Error, internalError

I get this error when I attempt to create a remote with a service account file. Any ideas? (Yes, i have drive api enabled)

I also have Domain wide delegation enabled.


#2

So that is google returning an error when rclone tries to list the teamdrives to present a menu of them.

Hmm, do you know the ID of the team drive?

Try saying no to use team drives and then edit the config file afterwards to say team_drive = XXX.


#3

@ncw I’m seeing the same thing. However, your suggestion to manually add the team_drive line to the config file worked for me. Thank you!


#4

Great! I wish I knew why google gives the 500 errors though! Is is something to do with your config?


#5

I don’t think it is. I followed the config steps exactly in the docs for the service account. I’m only getting the 500 error when I use the service account. If I use a regular user account, I don’t get the 500 errors and it lists that user’s Team Drives properly.


#6

So do you need to give the service account permissions to list the team drives?

Or maybe you need to use --drive-impersonate at that point?


#7

I am having the same issue, where would we add the permission and which one would we need to add?

I tried to add it to the rclone config as well, but still no luck on getting access to the Team Drive. Thanks!


#8

As a note, I am using a service account as well, and I can access the personal My Drive when I do impersonate command.


#9

Actually, I just figured this out. I had to give specific access to the service account for the team drive. I followed this and everything worked out.