See all files shared outside the domain

3,303 views
Skip to first unread message

Maurizio Caurio

unread,
Oct 17, 2017, 5:08:54 AM10/17/17
to GAM for G Suite

Hi guys,

 I can not find a specific command to view a report where, by specifying a user or all users, I pull out all the names of shared files outside domain. 

To prevent users from sharing sensitive content in Google Drive or Google Team Drive with people outside my organization.

Thanks!

Maurizio

P.S. Current Gam Version: 4.30

Ross Scroggs

unread,
Oct 17, 2017, 9:06:34 AM10/17/17
to google-ap...@googlegroups.com
Maurizio,

There is no command to get what you want but I have a script that will get the data for you.
Here are the comments from the top of the script:
# Purpose: For a Google Drive User(s), delete all drive file ACls for files shared outside of a list of specified domains                                                                                                                                                                                                                                                                            
# Note: This script can use basic GAM: https://github.com/jay0lee/GAM or advanced GAM: https://github.com/taers232c/GAMADV-X                                                                                                                                                                                                                                                                         
# Usage:                                                                                                                                                                                                                                                                                                                                                                                             
# 1: Get ACLS for all files, if you don't want all users, replace all users with your user selection in the command below                                                                                                                                                                                                                                                                            
#  $ Example, Basic GAM: gam all users print filelist id title permissions > filelistperms.csv                                                                                                                                                                                                                                                                                                       
#  $ Example, advanced GAM: gam config auto_batch_min 1 redirect csv ./filelistperms.csv multiprocess all users print filelist id title permissions                                                                                                                                                                                                                                                  
# 2: From that list of ACLs, output a CSV file with headers "Owner,driveFileId,driveFileTitle,permissionId,role,type,emailAddress"                                                                                                                                                                                                                                                                   
#    that lists the driveFileIds and permissionIds for all ACls except those from the specified domains.                                                                                                                                                                                                                                                                                             
#    (n.b., role, type, emailAddress and title are not used in the next step, they are included for documentation purposes)                                                                                                                                                                                                                                                                          
#  $ python GetNonDomainDriveACLs.py filelistperms.csv deleteperms.csv                                                                                                                                                                                                                                                                                                                               
# 3: Inspect deleteperms.csv, verify that it makes sense and then proceed                                                                                                                                                                                                                                                                                                                            
# 4: Delete the ACLS                                                                                                                                                                                                                                                                                                                                                                                 
#  $ gam csv deleteperms.csv gam user "~Owner" delete drivefileacl "~driveFileId" "~permissionId"                                                                                                                                                                                                                                                                                                    

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 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/6cf25f01-f59f-456e-8412-0f0f87d2b579%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Maurizio Caurio

unread,
Oct 19, 2017, 11:51:25 AM10/19/17
to GAM for G Suite
Hi Ross,

thank you so much!

I will try it!!

Maurizio
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages