Find owner of file with only the Document URL

29,342 views
Skip to first unread message

Tudor Pastor

unread,
Apr 13, 2017, 3:38:46 AM4/13/17
to GAM for G Suite
Hi,

I know you can check if a certain file with a certain ID belongs to a certain person, but what if you want to find out who the owner is...there is no command to check a file info, given that you just have the file URL and thus the file ID.

Can this be achieved in any other way or implemented in the future?

Robert Robinson

unread,
Apr 13, 2017, 4:11:33 AM4/13/17
to GAM for G Suite
Not sure about GAM but the google admin console can do this. Reports > Drive > Enter file ID. Might need to change what columns are displayed.

Ross Scroggs

unread,
Apr 13, 2017, 10:27:42 AM4/13/17
to google-ap...@googlegroups.com
Tudor,

Using the suggestions from Glen and Robert, try this: gam report drive user all filters "doc_id==<PutFileIDHere>"

The Stephen Perse Pre-Prep, Stephen Perse Foundation Junior School, Stephen Perse Foundation Senior School, The Stephen Perse Sixth Form College and Dame Bradbury's School are the schools of the Stephen Perse Foundation. The Stephen Perse Foundation is a Registered Charity (No:1120608) and a Company limited by guarantee, registered in England and Wales (No:6113565). Its registered office is 19 Union Road, Cambridge, Cambridgeshire CB2 1HF.

This e-mail and any attached file is intended only for the use of the addressee(s) named above and is confidential and may be legally privileged. If you have received this email and are not a named addressee please delete it; you must not disclose, copy, distribute or use the contents in any way that may be unlawful. Although the Stephen Perse Foundation operates anti-virus programmes, it does not accept responsibility for any loss or damage whatsoever that arises from the use of the email or attachments. In addition the Stephen Perse Foundation cannot be held liable for incomplete or corrupted transmissions, delay in receipt or any errors or omissions in the content of the email, as a result of transmission. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Foundation.

--
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 post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/53eaac27-d71b-424e-9b7b-8cc81dd6b4f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Carl Sundermann

unread,
Apr 13, 2017, 1:30:44 PM4/13/17
to GAM for G Suite
Nice trick, Ross (and others).  To piggyback on this question... This gam command doesn't appear to work for Forms. Docs and Sheets IDs work in the command, but a form Document ID returns 0 items. Is that known or am I doing something wrong?

Carl


On Thursday, April 13, 2017 at 9:27:42 AM UTC-5, Ross Scroggs wrote:
Tudor,

Using the suggestions from Glen and Robert, try this: gam report drive user all filters "doc_id==<PutFileIDHere>"

On Apr 13, 2017, at 1:11 AM, Robert Robinson <r...@stephenperse.com> wrote:

Not sure about GAM but the google admin console can do this. Reports > Drive > Enter file ID. Might need to change what columns are displayed.

On Thursday, 13 April 2017 08:38:46 UTC+1, Tudor Pastor wrote:
Hi,

I know you can check if a certain file with a certain ID belongs to a certain person, but what if you want to find out who the owner is...there is no command to check a file info, given that you just have the file URL and thus the file ID.

Can this be achieved in any other way or implemented in the future?

The Stephen Perse Pre-Prep, Stephen Perse Foundation Junior School, Stephen Perse Foundation Senior School, The Stephen Perse Sixth Form College and Dame Bradbury's School are the schools of the Stephen Perse Foundation. The Stephen Perse Foundation is a Registered Charity (No:1120608) and a Company limited by guarantee, registered in England and Wales (No:6113565). Its registered office is 19 Union Road, Cambridge, Cambridgeshire CB2 1HF.

This e-mail and any attached file is intended only for the use of the addressee(s) named above and is confidential and may be legally privileged. If you have received this email and are not a named addressee please delete it; you must not disclose, copy, distribute or use the contents in any way that may be unlawful. Although the Stephen Perse Foundation operates anti-virus programmes, it does not accept responsibility for any loss or damage whatsoever that arises from the use of the email or attachments. In addition the Stephen Perse Foundation cannot be held liable for incomplete or corrupted transmissions, delay in receipt or any errors or omissions in the content of the email, as a result of transmission. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Foundation.

--
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-manager+unsub...@googlegroups.com.

Ross Scroggs

unread,
Apr 13, 2017, 2:02:09 PM4/13/17
to google-ap...@googlegroups.com
Carl,

It worked for me for a Form.

To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.

To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

+KimNilsson

unread,
Apr 19, 2017, 9:59:37 AM4/19/17
to GAM for G Suite
Getting owner from a Form worked for me too.

LPP

unread,
Jan 16, 2020, 9:06:17 PM1/16/20
to GAM for G Suite


On Thursday, April 13, 2017 at 11:02:09 AM UTC-7, Ross Scroggs wrote:
Carl,

It worked for me for a Form.

Colin O'Leary

unread,
Feb 21, 2020, 8:25:34 AM2/21/20
to GAM for G Suite

How would you filter out just the owner of the file by running the command listed above as when I run it I get all of below:

name,actor.email,actor.profileId,billable,doc_id,doc_title,doc_type,id.applicationName,id.customerId,id.time,id.uniqueQualifier,ipAddress,owner,owner_is_shared_drive,owner_is_team_drive,primary_event,type,visibility

Chandrashekar N

unread,
May 6, 2020, 12:09:57 PM5/6/20
to GAM for G Suite
HI Ross,

I Tried this i got a bad request error.


On Thursday, April 13, 2017 at 11:32:09 PM UTC+5:30, Ross Scroggs wrote:
Carl,

It worked for me for a Form.

Robert Robinson

unread,
May 6, 2020, 12:22:32 PM5/6/20
to GAM for G Suite
I ran into form issues the other day and found out that the view form URL is a different URL (ID) to what editors get. I had to run a command against all my users to list all items that match the form name. I didn't know the owner of the file which is why I had to search all users:

gam all users show filelist query "fullText contains 'ProjectX'" todrive

From the csv file you can find the URL/ID you need.

Jose Vivek AR

unread,
Jul 17, 2020, 9:09:57 AM7/17/20
to GAM for G Suite
hi,

i forgot the email,

this is a page i created with the email i forgot,


could you help me find the email


regards
VIvek

On Thursday, April 13, 2017 at 7:57:42 PM UTC+5:30, Ross Scroggs wrote:
Tudor,

Using the suggestions from Glen and Robert, try this: gam report drive user all filters "doc_id==<PutFileIDHere>"

On Apr 13, 2017, at 1:11 AM, Robert Robinson <r...@stephenperse.com> wrote:

Not sure about GAM but the google admin console can do this. Reports > Drive > Enter file ID. Might need to change what columns are displayed.

On Thursday, 13 April 2017 08:38:46 UTC+1, Tudor Pastor wrote:
Hi,

I know you can check if a certain file with a certain ID belongs to a certain person, but what if you want to find out who the owner is...there is no command to check a file info, given that you just have the file URL and thus the file ID.

Can this be achieved in any other way or implemented in the future?

The Stephen Perse Pre-Prep, Stephen Perse Foundation Junior School, Stephen Perse Foundation Senior School, The Stephen Perse Sixth Form College and Dame Bradbury's School are the schools of the Stephen Perse Foundation. The Stephen Perse Foundation is a Registered Charity (No:1120608) and a Company limited by guarantee, registered in England and Wales (No:6113565). Its registered office is 19 Union Road, Cambridge, Cambridgeshire CB2 1HF.

This e-mail and any attached file is intended only for the use of the addressee(s) named above and is confidential and may be legally privileged. If you have received this email and are not a named addressee please delete it; you must not disclose, copy, distribute or use the contents in any way that may be unlawful. Although the Stephen Perse Foundation operates anti-virus programmes, it does not accept responsibility for any loss or damage whatsoever that arises from the use of the email or attachments. In addition the Stephen Perse Foundation cannot be held liable for incomplete or corrupted transmissions, delay in receipt or any errors or omissions in the content of the email, as a result of transmission. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Foundation.

--
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-manager+unsub...@googlegroups.com.

Ross Scroggs

unread,
Jul 17, 2020, 9:52:00 AM7/17/20
to google-ap...@googlegroups.com
Vivek,

Try this: gam report drive user all filters "1FAIpQLSdyvNyI69zStA2Twz0JBo9P_Vs3YtsyhLN-MyzbyUS6DsTktA"

Ross
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/c177af7e-5dd9-4e88-b877-5fbab62ddcd0o%40googlegroups.com.

Ankush Sachdeva

unread,
Aug 31, 2022, 8:48:54 AM8/31/22
to GAM for Google Workspace
Can we use multiple file ids in the command? 

gam report drive user all filters "doc_id==<File ID> OR <File ID2> or <File ID 2> "

Ross Scroggs

unread,
Sep 1, 2022, 6:17:17 PM9/1/22
to google-ap...@googlegroups.com
Ankush,

No:

$ gam report drive filter "doc_id==1DX22gHjn9mvwAkHN8k5XQ6NFTCwtGx1t,doc_id==1AduNToxmPJ9YC5lMV-N9N5R1Vq11Zp-Q"
Getting Reports for all users

ERROR: Invalid request: Duplicate parameter names in filter: doc_id

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.
Reply all
Reply to author
Forward
0 new messages