GAM Command to Retrieve File-Level Access Details from Shared Drives

36 views
Skip to first unread message

Bajrang Lal

unread,
Aug 31, 2026, 3:47:58 AM (yesterday) Aug 31
to GAM for Google Workspace

Hi Team,

We have identified more than 2,000 Shared Drives where the assigned Manager and Content Manager accounts are inactive. Before taking any remediation action, we would like to review the file access permissions within these Shared Drives to better understand ownership and access patterns.

Could you please advise if there is a GAM command or recommended approach to retrieve file-level permission details (users/groups and their access levels) for all files and folders within specific Shared Drives?

Any guidance, sample commands, or best practices would be greatly appreciated.

Thank you for your assistance.

Ross Scroggs

unread,
Aug 31, 2026, 12:45:42 PM (19 hours ago) Aug 31
to google-ap...@googlegroups.com
If a user is a member of a Shared Drive, every file/folder will have access by that user.
Are you looking for files/folders with explicit access?

You'll need a manager/content manager for each drive to get the information you want.

gam redirect csv ./SharedDriveOrganizers.csv print shareddriveorganizers includefileorganizers

Once you have a CSV file listing the Shared Drives and their organizer(manager/contectmanager) the following will get explicit ACLs.


gam config csv_input_row_filter "organizers:regex:^.+$" redirect csv ./ExplicitShares.csv multiprocess redirect stderr - multiprocess csv ./SharedDriveOrganizers.csv gam user "~organizers" print filelist select teamdriveid "~id" fields teamdriveid,id,name,mimetype,basicpermissions pm typelist user,group inherited false em pmfilter oneitemperrow

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/d32572d5-0230-4af1-8807-b0fbf0b851e5n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages