What is the problem you are having with rclone?
I have read the guide, double/triple checked but I am stuck. I created a service account with domain wide delegation, created the .json file with the SA details, and added the client_id for that account with scope of https://www.googleapis.com/auth/drive. I configured the remote, and I am able to connect with the service account without impersonation, but when I try to impersonate a user I get:
Response: {
"error": "unauthorized_client",
"error_description": "Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested."
}
Is there anything that needs to be done to impersonate a user besides making sure that domain-wide delegation is set for the SA?
What is your rclone version (output from rclone version
)
rclone v1.49.3
- os/arch: linux/amd64
- go version: go1.12.9
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Linux / OpenMediaVault 4.1.17 (debian based)
Which cloud storage system are you using? (eg Google Drive)
Google Drive
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone -v --drive-impersonate josh@empowerfunnels.com lsf gdrive:
A log from the command with the -vv
flag (eg output from rclone -vv copy /tmp remote:tmp
)
rclone -vv --drive-impersonate josh@empowerfunnels.com lsf gdrive:
2019/09/25 12:03:55 DEBUG : rclone: Version "v1.49.3" starting with parameters ["rclone" "-vv" "--drive-impersonate" "josh@empowerfunnels.com" "lsf" "gdrive:"]
2019/09/25 12:03:55 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2019/09/25 12:03:55 ERROR : : error listing: couldn't list directory: Get https://www.googleapis.com/drive/v3/files?alt=json&fields=files%28id%2Cname%2Csize%2Cmd5Checksum%2Ctrashed%2CmodifiedTime%2CcreatedTime%2CmimeType%2Cparents%2CwebViewLink%29%2CnextPageToken&includeItemsFromAllDrives=true&pageSize=1000&prettyPrint=false&q=trashed%3Dfalse+and+%28%27root%27+in+parents%29&supportsAllDrives=true: oauth2: cannot fetch token: 401 Unauthorized
Response: {
"error": "unauthorized_client",
"error_description": "Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested."
}
2019/09/25 12:03:55 Failed to lsf with 2 errors: last error was: error in ListJSON: couldn't list directory: Get https://www.googleapis.com/drive/v3/files?alt=json&fields=files%28id%2Cname%2Csize%2Cmd5Checksum%2Ctrashed%2CmodifiedTime%2CcreatedTime%2CmimeType%2Cparents%2CwebViewLink%29%2CnextPageToken&includeItemsFromAllDrives=true&pageSize=1000&prettyPrint=false&q=trashed%3Dfalse+and+%28%27root%27+in+parents%29&supportsAllDrives=true: oauth2: cannot fetch token: 401 Unauthorized
Response: {
"error": "unauthorized_client",
"error_description": "Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested."
}