Bulk Operation - Disable Link Sharing on all files owned by a single user

113 views
Skip to first unread message

Karl Renaut

unread,
May 30, 2019, 1:30:45 PM5/30/19
to GAM for G Suite
I'm trying to cut a BASH script that uses GAM to change Link Sharing permissions on all items on a single user from "Anyone at <Domain> with link" to "Off".  By playing with the API and GAM, I think the boolean value I need to change is "allowFileDiscovery" and that'll move to <False>.  I can't address these files manually because they literally have thousands upon thousands of them, It would take me days even addressing them in groups of 50 (the limit from the site UI) so scripting the action is the only realistic approach I have.

Here's my command.  I'm getting a 404 "Share Drive Not Found", so I think I'm mistakenly targeting a TeamDrive or something.  This is the first time I've tried to use GAM, so forgive me if I'm making obvious mistakes.

gam add drivefileacl <testfileID> domain ka...@domain.com role writer discoverable false


Have I been looking at the wrong part of the commands doc or am I misunders?

Thanks in advance

Karl Renaut

unread,
May 30, 2019, 1:53:31 PM5/30/19
to GAM for G Suite
Reply all
Reply to author
Forward
0 new messages