Bulk transfer ownership

75 views
Skip to first unread message

Mittal Chandra

unread,
Oct 9, 2025, 2:02:20 PMOct 9
to GAM for Google Workspace
Hi Ross
I would like to transfer ownership of selective files that is in current_owner users trashed folder to a new_owner. Please note that the files can be in different folders.

Is this the right command to use?
gam user <current_owner_email> update drivefileacl <file_id> <new_owner_email> role owner transferownership true

Thanks in advance
Mittal

Ross Scroggs

unread,
Oct 9, 2025, 2:06:07 PMOct 9
to google-ap...@googlegroups.com
Where do you want the files to be located after the ownership is changed?

In the current owners My Drive or the new owners My Drive?

Ross
----
Ross Scroggs



--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-apps-manager/6dfb9d0d-361d-486e-84f5-c952a8443195n%40googlegroups.com.

Mittal Chandra

unread,
Oct 9, 2025, 2:16:10 PMOct 9
to GAM for Google Workspace

It will be the new owner My Drive

Ross Scroggs

unread,
Oct 9, 2025, 2:22:55 PMOct 9
to google-ap...@googlegroups.com
See: https://github.com/GAM-team/GAM/wiki/Users-Drive-Ownership#transfer-ownership-of-files-that-a-source-user-owns-to-a-target-user

gam user <current_owner_email> transfer ownership <file_id> <new_owner_email> parentid root includetrashed norecursion

This will put the files in the top of the new owner's My Drive; if you want them in some other folder, replace root with the id of the desired folder.

Ross
----
Ross Scroggs


Mittal Chandra

unread,
Oct 9, 2025, 2:46:43 PMOct 9
to GAM for Google Workspace
Thank you! I found that the folder I'm trying to transfer ownership is already owned by a new_owner but the files contained in the folder are still owned by the original owner. In this case would I just change the ownership back to the original owner to perform the above command? I believe I will need a recursion=true in this case?

Ross Scroggs

unread,
Oct 9, 2025, 4:50:16 PMOct 9
to google-ap...@googlegroups.com
If the New owner alread owns the folder try this to move the folder to the new parents root.
gam user newowner update drivefile <FolderID> parentid root

gam user newowner claim ownership <FolderID>

Ross

----
Ross Scroggs



Ross Scroggs

unread,
Oct 9, 2025, 4:51:50 PMOct 9
to google-ap...@googlegroups.com
Yu may have to do this first:
gam user newowner untrash driveifle <FolderID>

Ross
----
Ross Scroggs


Mittal Chandra

unread,
Oct 9, 2025, 6:34:11 PMOct 9
to GAM for Google Workspace
Thanks, Ross! Your help was greatly appreciated!
Reply all
Reply to author
Forward
0 new messages