How to transfer ownership of Google Drive folder perfectly

Going around the forums about Google Drive, Hieu has many people who want to transfer ownership of Google Drive folder and subfolders in bulk but have no solution or have to use a third party and pay a fee. With experience researching Google Drive API and being the author of simple-drive (A Google Drive library on Python), Hieu will guide you on all the ways to transfer ownership of Google Drive effectively and for free.

Notes before implementation

Ownership of Google Drive can only be transferred to members of the same organization (domain) .

Let Hieu give you an example to make it easier to understand. Files or folders of an account belonging to @gmail.com (a normal account) can only be transferred to another account also belonging to @gmail.com. Similarly, files and folders of an account belonging to @lucidgen.com (a Google Workspace account) can only be transferred to another account belonging to @lucidgen.com.

Difference between a Google Workspace account and a regular Gmail account in transferring ownership of Google Drive:

CharacteristicGoogle WorkspaceGmail
Scope of ImplementationCác tài khoản cùng Google Workspace.Các tài khoản Gmail bình thường.
Effective dateĐổi chủ sở hữu ngay lập tức.Chỉ gửi lời mời làm chủ sở hữu, tài khoản nhận thư mời phải xác nhận đồng ý.
Cancel actionKhông thể.Có thể hủy trước khi tài khoản nhận thư mời chưa đồng ý.

Transfer ownership of a Google Drive folder

Step 1: Select a folder and edit the recipient’s permissions from Editor to Transfer ownership.

Changing ownership of a folder only affects that folder, not the files inside the folder. Don’t worry, Lucid Gen’s tool will help you.

Transfer ownership of Google Drive folder
Transfer ownership of Google Drive folder

Step 2: Send an invitation to transfer ownership of Google Drive folder. Click the Send Invitation button.

Send file ownership invitation
Send file ownership invitation

Step 3: The new owner will need to accept the invitation if the account is not Google Workspace. Click the Accept button to become the owner of the file.

Workspace accounts transfer ownership immediately without the recipient’s consent.

For Gmail, the recipient must accept ownership
For Gmail, the recipient must accept ownership

If you want to cancel the invitation to transfer ownership of Google Drive, change the permission from Editor (Pending owner) to Cancel ownership transfer. Only Gmail accounts can cancel an invitation to transfer ownership of Google Drive before the recipient agrees.

Gmail accounts can cancel ownership transfer
Gmail accounts can cancel ownership transfer

Transfer ownership of all files

This method allows you to transfer permissions to all files on Google Drive at once. The downside of this method is that it still does not transfer permissions to files located inside the folders you have selected.

Step 1: Select all files and share them to transfer ownership of all files.

Transfer ownership of all files in Google Drive
Transfer ownership of all files in Google Drive

Step 2: The new owner must accept the invitation if the account is a regular Gmail. Click the Respond button to reply.

With Gmail, the recipient must respond to claim ownership.
With Gmail, the recipient must respond to claim ownership.

Select all files, click the share button, and click the Accept ownership button to accept or decline the invitation.

Can accept ownership for all files at once
Can accept ownership for all files at once

To withdraw ownership transfer of all files on Google Drive, select all files, click the share button, and edit permissions from Editor (Pending owner) to Cancel ownership transfer.

Gmail accounts can cancel ownership transfer for all files at once
Gmail accounts can cancel ownership transfer for all files at once

Transfer ownership of Google Drive in bulk using a tool

Lucid Gen’s Transfer Ownership Tool can help you transfer ownership of Google Drive in a powerful and completely free way. Here’s what it can help you do:

  1. Export the list of files in the account to an Excel file.
  2. Transfer ownership of Google Drive folder including all files and subfolders:
    • All files and folders of the account.
    • All files and folders are inside a specific directory.
    • All files and folders are by an ID list.
    • Configure from an Excel file with ID and email columns.
  3. Withdraw invitation to transfer ownership of Google Drive (Gmail):
    • All files and folders of the account.
    • All files and folders are inside a specific directory.
    • All files and folders are by an ID list.
  4. Accept or decline the invitation to transfer ownership of Google Drive (Gmail).
    • All files and folders in Shared With Me.
    • All files and folders are inside a specific directory.
    • All files and folders are by an ID list.

However, to use this tool you need to have a file client_secret.jsonthat has been properly configured according to how to create a Client Secret in Google Cloud.

Remember to add the emails you want to use with the tool to Test Users.

Log in

Step 1: Open the tool and start logging in. Enter to select the client_secret.json file, and continue Enter to automatically open your browser.

Bắt đầu đăng nhập vào Transfer Ownership Tool
Start logging into the Transfer Ownership Tool

Step 2: Select the account you added to the Test Users of the project in this client_secret.json file.

Chọn email cần sử dụng công cụ
Select the email to use the tool

Step 3: Confirm to continue logging in. Click the Continue button.

Tiếp tục vì đây chỉ là cảnh báo về dự án của bạn chưa được duyệt
Continue as this is just a warning that your project has not been approved yet.

Keep clicking Continue until you are successfully logged in.

Tiếp tục để hoàn tất đăng nhập
Continue to complete the login

Transfer ownership of Google Drive in bulk

After successfully logging in, you will see the menu. To use any feature, just enter the number of that feature.

For example, if you want to transfer ownership of Google Drive for a folder including its files and folders, you should do the following:

  • Choose an action: 2.
  • Select a method to transfer ownership: 2.
  • Please provide the recipient email: Email of the recipient of ownership on Drive.
  • Please provide the folder_id: ID of the folder to transfer ownership of Google Drive.
Transfer ownership of Google Drive folder and subfolders in bulk in the Transfer Ownership Tool
Transfer ownership of Google Drive folder and subfolders in bulk in the Transfer Ownership Tool

Cancel transfer ownership of Google Drive in bulk

For example, if you want to revoke the Google Drive ownership transfer invitation for a folder that includes its files and folders, you should do the following:

  • Choose an action: 3.
  • Select a method to cancel ownership transfer: 2.
  • Please provide the folder_id: ID of the folder to cancel the transfer ownership of Google Drive.
Cancel transfer of ownership in bulk
Cancel transfer of ownership in bulk

Accept pending owner in bulk

For example, if you want to accept the pending owner of a directory including its files and directories, you should do the following:

  • Select an action: 4.
  • Would you like to Accept or Decline: 1.
  • Select a method to accept pending owner: 2.
  • Please provide the folder_id: ID of the folder to accept the pending owner.

To sign in to a different account, you can use the Switch accounts action or close and reopen the Transfer Ownership Tool.

Accept pending owner in bulk
Accept pending owner in bulk

transfer ownership of Google Drive in Python

If you are a Python user, check out how to use Google Drive API in Python with Simple-Drive. Here is a sample code to transfer ownership, cancel ownership, and accept pending ownership.

from simple_drive import Auth, Drive, SearchTerms, Roles

# Authorize
auth = Auth.local_web_server(client_secrets_file='client_secrets.json')
drive = Drive(auth, verbose=True)

# Get files and sub-folders in a folder
email = 'current_owner@gmail.com'
folder_id = 'YourFolderID'

files = drive.Files.list(SearchTerms.owner_email(value=email),
                         SearchTerms.folder_id(folder_id),
                         SearchTerms.trashed_equal(False),
                         deep_folder=True)

# Transfer ownership
recipient_email = 'new_owner@gmail.com'
for file in files:
    drive.Permissions.transfer_ownership(file_id=file['id'], email=recipient_email)


# Cancel ownership transfer
for file in files:
    drive.Permissions.update(file_id=file['id'], email=recipient_email, role=Roles.EDITOR)


# Accept pending owner (Remember login to the recipient account first)
for file in files:
    drive.Permissions.pending_owner(file_id=file['id'], accept=True)

Conclusion

Initially, Hieu only intended to write a tutorial on transferring ownership of Google Drive in Python. But thinking back, Hieu realized that many people who are not familiar with coding cannot use the API, so he created the Transfer Ownership Tool. We hope that in the future, Google Drive will have the feature of transferring all files and subfolders inside a selected folder. If you find this tool useful, please share the article or donate to me.

Related articles

Hieu Tran Ngoc Minh

Hieu Tran Ngoc Minh

I am currently working as a Data Analyst; before that, I worked in Digital Marketing. Blogging is a joy, helping me share my knowledge and experiences from life and work. You can donate to me here.

Leave a Comment

Feel free to leave your comment, and we will review and respond as soon as possible. Please use a real email to ensure your comment is approved and to receive notifications when we reply. You can also add an avatar to your email.