How to locate owner of a Google Form

64,126 views
Skip to first unread message

Josh Gold

unread,
Nov 12, 2020, 3:49:22 PM11/12/20
to GAM for G Suite
Attempting to follow the instructions listed here to find owner of Google Form:
https://github.com/taers232c/GAMADV-XTD3/wiki/Find-File-Owner

I found all the ways so far that are not the correct syntax :-) (see attached PNG)

Capture.PNG

Ross Scroggs

unread,
Nov 12, 2020, 4:12:57 PM11/12/20
to google-ap...@googlegroups.com
Josh,

The report command can only look back 180 days so if the form hasn't been accessed in that long it can't help.
gam show ownership "1FA..."


gam config auto_batch_min 1 redirect csv - multiprocess redirect stderr null multiprocess all users print filelist select id "1FA..." fields id,name,owners.emailaddress norecursion

Ross


--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" 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/50722da7-75f1-4773-80ae-b813e3b20036n%40googlegroups.com.


--

Josh Gold

unread,
Nov 12, 2020, 4:31:35 PM11/12/20
to GAM for G Suite
Hello Ross,

I just completed and submitted the form in hopes that will allow this form to show in the results.   

Then I will use this syntax later today to see if that works: gam report drive user all filters "doc_id==1FAIpQLScqx8rFxpSE3ncVJwPahzpvzyUwzTpFr401CHBGnFnAyOyoGw"

Bradley Stinson

unread,
Nov 13, 2020, 9:59:53 AM11/13/20
to google-ap...@googlegroups.com
You can't search for forms by the ID that you pull from the URL unless it is the decrypted ID. The one you see when viewing a form from the /view link is encrypted and different from what you see as the form owner and won't return any results when searching in Reports or Audity in the admin console. The easiest way to find the owner of a form is to search for it by name or by searching for the response sheet that is linked to it. The sheet name is typically (but not always) the same as the form name with (Responses) appended to the end. Most of the time the owner of the response sheet is also the owner of the form. Otherwise you can open a case with Google and provide the ID that you can see from the /view URL and ask them to provide you with the decrypted ID then search for it using your command and you will get your result.

Bio
Bradley Stinson| Application Engineer
Application Engineering, CorpInfra
P: 480-327-0165 x22320



Josh Gold

unread,
Nov 13, 2020, 1:08:08 PM11/13/20
to GAM for G Suite
Opened case with Google Support, provided them the form URLs, and they are looking into it.

Thank you

Kim Nilsson

unread,
Nov 15, 2020, 4:35:49 AM11/15/20
to GAM for G Suite
Sometimes you can open and read the HTML source of the form and there find the original name, since the header or title of the /view form may not be the same as the name of the /edit form.

Josh Gold

unread,
Nov 16, 2020, 12:02:02 PM11/16/20
to GAM for G Suite

Looking at the HTML source of the Google Form, /viewform and /edit show the same encrypted ID.   But it was worth checking.  Thank you.

Josh Gold

unread,
Nov 16, 2020, 2:18:49 PM11/16/20
to GAM for G Suite
Google support has provided the owner name and the encrypted URLs for the Google Form.  I don't know how they did it though.

Dennis M

unread,
Nov 16, 2020, 2:56:26 PM11/16/20
to GAM for G Suite
Glad you got help there Josh, Google support did not find mine.

I was luckily enough to use 

gam all users print filelist query "mimeType = 'application/vnd.google-apps.form'" todrive

And then from there was able to figure out which form it was as the name was close to the Forms title.




Josh Gold

unread,
Nov 16, 2020, 3:20:00 PM11/16/20
to GAM for G Suite
Thanks Dennis.   The gam command you used could be useful in the future for everyone!

Dierk Polzin

unread,
Mar 29, 2021, 6:09:37 PM3/29/21
to GAM for Google Workspace
I used this for a few usernames in a department and found the owner of the form I was looking for..

gam user <XXXXX1> print filelist query "mimeType = 'application/vnd.google-apps.form'" todrive
gam user <XXXXX2> print filelist query "mimeType = 'application/vnd.google-apps.form'" todrive
gam user <XXXXX3> print filelist query "mimeType = 'application/vnd.google-apps.form'" todrive

Useful Search

Karl Piller

unread,
Feb 28, 2023, 1:15:40 PM2/28/23
to GAM for Google Workspace
Thanks for that!

Here for all users and all fields. If you are looking for all your Forms info in the org like I was.

gam all users print filelist query "mimeType = 'application/vnd.google-apps.form'" fields alternatelink,appdatacontents,appproperties,basicpermissions,cancomment,canreadrevisions,capabilities,contenthints,contentrestrictions,copyable,copyrequireswriterpermission,createddate,createdtime,description,driveid,drivename,editable,explicitlytrashed,exportlinks,fileextension,filesize,foldercolorrgb,fullfileextension,hasaugmentedpermissions,hasthumbnail,headrevisionid,iconlink,id,imagemediametadata,isappauthorized,labelinfo,labels,lastmodifyinguser,lastmodifyingusername,lastviewedbyme,lastviewedbymedate,lastviewedbymetime,lastviewedbyuser,linksharemetadata,md5,md5checksum,md5sum,mime,mimetype,modified,modifiedbyme,modifiedbymedate,modifiedbymetime,modifiedbyuser,modifieddate,modifiedtime,name,originalfilename,ownedbyme,ownernames,owners,parents,permissionids,permissions,properties,quotabytesused,quotaused,resourcekey,restrict,restricted,shareable,shared,shareddriveid,shareddrivename,sharedwithmedate,sharedwithmetime,sharinguser,shortcutdetails,size,spaces,star,starred,teamdriveid,teamdrivename,thumbnaillink,thumbnailversion,title,trash,trashed,trasheddate,trashedtime,trashinguser,userpermission,version,videomediametadata,view,viewed,viewedbyme,viewedbymedate,viewedbymetime,viewerscancopycontent,webcontentlink,webviewlink,writerscanshare todrive

Ross Scroggs

unread,
Feb 28, 2023, 1:35:12 PM2/28/23
to google-ap...@googlegroups.com
Karl,

You can use option allfields to shorten your command.
gam all users print filelist query "mimeType = 'application/vnd.google-apps.form'" allfields todrive

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.


--

Karl Piller

unread,
Feb 28, 2023, 6:37:00 PM2/28/23
to GAM for Google Workspace
Geesh, thanks :)

James SEYMOUR

unread,
Feb 28, 2023, 7:30:13 PM2/28/23
to GAM for Google Workspace
I generally find that I am looking for forms created by our staff, so use the StaffOU in this command, but other OUs will work or just a "/" for all OUs. Often the File Name is the same Form Name, but not always, so you may want to search for words that are 'unique' to that form to narrow down the results, as the query is searching all the text of the form. Add other fields as necessary.

gam ou_and_children <Top Level OU> print filelist query "fullText contains '\"<Form Title>\"'AND mimeType = 'application/vnd.google-apps.form'" fields id,name,webViewLink todrive

Karl Piller

unread,
Mar 3, 2023, 12:26:28 PM3/3/23
to GAM for Google Workspace
I am finding at least one Form that does not have an owner. I can query the Form with fileinfo and the ID. It does not show any owner, it only has roles of Editor.

So when I run either of the following commands to get all Forms in my org it is not included as they appear to key off Owner.

gam all users print filelist query "mimeType = 'application/vnd.google-apps.form'" allfields todrive
or
gam ou_and_children / print filelist query "mimeType = 'application/vnd.google-apps.form'" allfields todrive


Any idea what command I can run to find all Forms in my org including any that do not have the Owner role?
Or a command that can find any drive files altogether that don't have an Owner

Thanks!

Kim Nilsson

unread,
Mar 3, 2023, 12:34:23 PM3/3/23
to google-ap...@googlegroups.com
Should mean that it resides in a Shared Drive!

If that is true that's very good. You just have to figure out which it is.

/Kim
--
There is No Substitute!

Karl Piller

unread,
Mar 3, 2023, 12:47:46 PM3/3/23
to GAM for Google Workspace
That was the deal. Ross helped me with the command to include the teams drive Forms.

gam all users print filelist fullquery "mimeType = 'application/vnd.google-apps.form'" allfields todrive corpora alldrives

Thanks very much to both of you for the help.

James SEYMOUR

unread,
Mar 6, 2023, 7:09:36 PM3/6/23
to GAM for Google Workspace
Hi Karl,

Thanks for sharing that command, one for the toolbox. You may also find it useful to add the filepath option as this will then show you which are in Shared Drives and which are in users MyDrives. It also shows which are "SharedWithMe" as well. There may be other locations, but these 3 were in my small set of results.

gam all users print filelist fullquery "mimeType = 'application/vnd.google-apps.form'" allfields filepath todrive corpora alldrives

Cheers

James
Reply all
Reply to author
Forward
0 new messages