Transferring docs that have already been transferred

66 views
Skip to first unread message

Michael Conway

unread,
Oct 9, 2023, 3:29:14 PM10/9/23
to GAM for Google Workspace
We used to archive all of our users, but due to pricing constraints, have been deleting terminated and otherwise no longer used accounts for a few months. As part of the decommissioning process, I transfer user's docs to a kind of holding account. So if I log into Drive as that holding account, I can see the transferred folders, named for the email address of the former owner, as you'd expect. Occasionally I get requests after the fact for access to documents from the former owner. Is there a good way in GAM Advanced to transfer just that particular folder from the holding account to the new owner? Would need to include rights to all containing files as well, of course. Thanks!

Pie Man

unread,
Oct 9, 2023, 6:08:46 PM10/9/23
to google-ap...@googlegroups.com
Hi,

Create a sheet with the originalowner (your holding account in your case), newowner, folderid of the folder you want to transfer and if you want the current owner to retain access to the folder a role column retainrole which can be none editor etc you will probably want none. I called my sheet ChangeFolderOwner catchy I know.

Then run you will need to run a gam batch command

Create a file called newfolderowner.bat which contains the following code

gam csv gsheet sheetowner@org name ChangeFolderOwner Sheet1 gam user ~originalowner add drivefileacl ~folderid user ~newowner role editor

commit-batch

gam csv gsheet sheetowner@org name ChangeFolderOwner Sheet1 gam user ~newowner claim ownership ~folderid retainrole ~retainrole

commit-batch

gam csv gsheet sheetowner@org name ChangeFolderOwner Sheet1 gam user ~newowner update drivefile id ~folderid addparent root

The first command adds the new owner to the folder as you can't give ownership of a folder to a user without them having some access to it

The second command does the change of ownership and the third command puts it into the users root directory.

To run this command use

gam batch newfolderowner.bat

commit-batch is used to ensure all steps complete before the next starts.

There are probably better ways of doing this. I haven't tried it with lots of files and it isn't fast but it works for my use case of giving ownership of a few files and a directory to a user and removing me from them. I'd be interested to hear how it works for larger folders, but do run a few tests before you use it in anger. I'd be tempted to create a filetree of any folder I was testing on so I had a record of all the files just incase.

HTH








On Mon, 9 Oct 2023, 20:29 Michael Conway, <Michael...@nfiindustries.com> wrote:
We used to archive all of our users, but due to pricing constraints, have been deleting terminated and otherwise no longer used accounts for a few months. As part of the decommissioning process, I transfer user's docs to a kind of holding account. So if I log into Drive as that holding account, I can see the transferred folders, named for the email address of the former owner, as you'd expect. Occasionally I get requests after the fact for access to documents from the former owner. Is there a good way in GAM Advanced to transfer just that particular folder from the holding account to the new owner? Would need to include rights to all containing files as well, of course. Thanks!
Please consider the environment before printing this e-mail.

This e-mail, including any attachments, contains information that may be privileged and confidential and subject to legal restrictions and penalties regarding its unauthorized disclosure or use. You are prohibited from disclosing, copying, distributing or otherwise using information in this e-mail if you are not the intended recipient. If you have received this e-mail in error, please notify me immediately by return e-mail or phone, and promptly delete this e-mail and all attachments from your system. Thank you!

--
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 on the web visit https://groups.google.com/d/msgid/google-apps-manager/5435ca95-8386-431d-ae46-8932e48af66bn%40googlegroups.com.

Ross Scroggs

unread,
Oct 9, 2023, 8:17:44 PM10/9/23
to google-ap...@googlegroups.com
See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Drive-Transfer#gam-data-transfers

Here's a start:
gam user holdi...@domain.com transfer drive newo...@domain.com select <FolderIDo...@domain.com>   ...

There are lots of options, test with samople users.

I'm assuming that you don't want to retain the holding account old user folder; is that correct ?

Ross

----
Ross Scroggs



On Oct 9, 2023, at 12:29 PM, Michael Conway <Michael...@nfiindustries.com> wrote:

We used to archive all of our users, but due to pricing constraints, have been deleting terminated and otherwise no longer used accounts for a few months. As part of the decommissioning process, I transfer user's docs to a kind of holding account. So if I log into Drive as that holding account, I can see the transferred folders, named for the email address of the former owner, as you'd expect. Occasionally I get requests after the fact for access to documents from the former owner. Is there a good way in GAM Advanced to transfer just that particular folder from the holding account to the new owner? Would need to include rights to all containing files as well, of course. Thanks!

Michael Conway

unread,
Oct 10, 2023, 9:03:14 AM10/10/23
to GAM for Google Workspace
Thanks all

So Ross, all I would need is to specify the name of the folder, in this case the email address of the terminated user? Doesn't need to be an ID? I saw that link with the options, but wasn't exactly sure what DriveFileEntity could be - the skipids option implies it is an ID, not a name. That was my concern - the holding account owns a ton of stuff. For regular accounts, I might do a print filelist todrive if someone just kind of wants to peruse through what a terminated user owns, in case anything looks important. But doing that for the holding account would probably take years lol, and would change daily. And no, the holding account does not need to retain any rights.

Ross Scroggs

unread,
Oct 10, 2023, 9:44:27 AM10/10/23
to google-ap...@googlegroups.com
My mistake, if the folder name is unique you can do:
gam user hold...@domain.com transfer drive newo...@domain.com select name oldo...@domain.com   ...
Ross
----
Ross Scroggs


Michael Conway

unread,
Oct 10, 2023, 11:28:45 AM10/10/23
to GAM for Google Workspace
Perfect, worked a treat. Thanks very much
Reply all
Reply to author
Forward
0 new messages