Query drivefiles to find external user access.

34 views
Skip to first unread message

Dee Jarvis

unread,
Sep 17, 2025, 2:12:35 PM (9 days ago) Sep 17
to GAM for Google Workspace
I have been using Gemini in an attempt to get this working but it keeps insisting that I am running an old version of GAM when I have installed GAM7 fresh to run this query. 
We have a need to find specific external users who may have or had access to files within our tenant. 

Here is what I have been trying to use to grab this data.

gam print drivefiles allsharedrives query "'us...@mail.com' in readers or 'us...@mail.com' in writers or 'us...@mail.com' in commenters" > export.csv

I receive an error that the "drivefiles" is not a valid choice. Is there some other option to run this query is it not currently possible with GAM?

Ross Scroggs

unread,
Sep 17, 2025, 3:18:30 PM (9 days ago) Sep 17
to google-ap...@googlegroups.com
Dee,

Send me a private  Meet/Zoom invitation and I'll help.

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/4cedbd7d-343a-40de-a895-f9123f2a768dn%40googlegroups.com.

Ross Scroggs

unread,
Sep 17, 2025, 3:26:25 PM (9 days ago) Sep 17
to google-ap...@googlegroups.com
Is this for My Drives and/or Shared Drives/

Gemini is way off.

Ross
----
Ross Scroggs


On Sep 17, 2025, at 11:12 AM, 'Dee Jarvis' via GAM for Google Workspace <google-ap...@googlegroups.com> wrote:

Ross Scroggs

unread,
Sep 18, 2025, 10:20:38 AM (8 days ago) Sep 18
to google-ap...@googlegroups.com
Ross
----
Ross Scroggs


On Sep 17, 2025, at 11:12 AM, 'Dee Jarvis' via GAM for Google Workspace <google-ap...@googlegroups.com> wrote:

Dee Jarvis

unread,
Sep 18, 2025, 11:29:05 AM (8 days ago) Sep 18
to GAM for Google Workspace
Thanks for getting back to me so fast Ross. I had a ton of meetings yesterday so I wasn't able to circle back. I ended up getting what I needed from a drive perspective.
I ended up running this to pull all file permissions for all users

gam redirect csv ./all_drive_permissions.csv all users print filelist fields id,name,owners,permissions oneitemperrow showownedby any


Reply all
Reply to author
Forward
0 new messages