How do you audit Google Drive files permission of an account with a massive number of files?

108 views
Skip to first unread message

Christian Wijaya

unread,
Apr 12, 2023, 2:50:14 AM4/12/23
to GAM for Google Workspace
Hi Colleagues,

Do you know the most effective way to get the permission information of Google Drives within an account that has massive number of files?

I have several accounts that has more than a million files each.

Everytime I tried to pull permission information from the files using below command:

gam config auto_batch_min 1 redirect csv ./filelistperms.csv multiprocess user a...@domain.com print filelist fields id,name,permissions,owners.emailaddress,mimetype <pm clauses>

more often than not, the process stop in the middle with error http.client.InCompleteRead.

The objective is to remove permission "anyoneWithLink" from each files owned by those accounts.

Thank you!

Ross Scroggs

unread,
Apr 12, 2023, 10:14:15 AM4/12/23
to google-ap...@googlegroups.com
Christian,

gam redirect csv ./filelistperms.csv user a...@domain.com print filelist fields id,name,basicpermissions,owners.emailaddress,mimetype query "visibility='anyoneWithLink'"

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 on the web visit https://groups.google.com/d/msgid/google-apps-manager/a988cd1e-a9c6-4ffc-afbb-7ee4d3889bc4n%40googlegroups.com.

Christian Wijaya

unread,
Apr 12, 2023, 7:53:29 PM4/12/23
to google-ap...@googlegroups.com
Hi Ross,

As always, thanks!

This command worked well for me for accounts with large number of files. 

--
Regards,

Christian
Reply all
Reply to author
Forward
0 new messages