User Drives ("My Drive")

17 views
Skip to first unread message

Shay Bassett

unread,
Jan 9, 2026, 1:52:21 PM (3 days ago) Jan 9
to GAM for Google Workspace
Good morning,

Using GAM7 I am trying to run the command below to obtain a list of files exposed to the public. The query seems to fail on one account causing the .CSV file to not be generated.

gam all users print filelist query "visibility='peopleWithLink' or visibility='public'" fields id,title,owners,permissions,webViewLink > Public_User_Files.csv  

C:\GAM7>gam all users print filelist query "visibility='peopleWithLink' or visibility='public'" fields id,title,owners,permissions,webViewLink > Public_User_Files.csv

Getting all Users that match query (isSuspended=False), may take some time on a large Google Workspace Account...
Got 269 Users...
Getting all Drive Files/Folders that match query ('me' in owners and (visibility='peopleWithLink' or visibility='public')) for us...@domain.gov (1/269)
User: us...@domain.gov, Drive File/Folder Print Failed: Query ('me' in owners and (visibility='peopleWithLink' or visibility='public')) Invalid (1/269)

Does anyone have any ideas as to what steps I need to take to resolve the issue?

Thank you,
Shay Bassett

Ross Scroggs

unread,
Jan 9, 2026, 2:01:47 PM (3 days ago) Jan 9
to google-ap...@googlegroups.com
You want: query "visibility='anyoneWithLink' or visibility='anyoneCanFind'"

Ross

--
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/e38a2c4d-bc35-4be1-bf07-f04e6aa6c788n%40googlegroups.com.


--

Shay Bassett

unread,
Jan 9, 2026, 5:25:04 PM (2 days ago) Jan 9
to google-ap...@googlegroups.com
Ross,

Thank you for the feedback, In light of your feedback I did get the command below to work however I was not prompted for the .csv file.  How would I go about receiving the .csv download?

gam all users print filelist query "visibility='anyoneWithLink'" fields id,title,owners,permissions,webViewLink > Public_User_Files.csv

Below is a sample of what was displayed on screen.
Getting all Drive Files/Folders that match query ('me' in owners and (visibility='anyoneWithLink')) for acc...@domain.gov (269/269)
Got 1 Drive Files/Folders that matched query ('me' in owners and (visibility='anyoneWithLink')) for acc...@domain.gov...

Thank you,

Shay Bassett



Ross Scroggs

unread,
Jan 9, 2026, 5:27:00 PM (2 days ago) Jan 9
to google-ap...@googlegroups.com
Send me a private Meet/Zoom invitation and I'll help.

Ross



--

Shay Bassett

unread,
Jan 9, 2026, 5:28:58 PM (2 days ago) Jan 9
to google-ap...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages