Search code examples
google-drive-api

Files created with Google Drive API are owned by the Service Account


When I create a file with Google Drive API in my private Drive, it is owned by my Service Account and by default not accessible with my primary account unless I add a new permission. Even then, my actions are somewhat limited, e.g. I cannot delete it. Assuming it occupies space on my Drive, it's kind of weird.

What is the common way around this? Ownership transfer?


Solution

  • I clearly misunderstood how this works.

    The Service Account is a separate entity operating in the Google Cloud project scope, completely isolated from my private Drive.

    In that case, I find it safer to let it own the files and add standard permissions as necessary. As long as the project is alive and the quota is not exceeded, it is not an issue.