Skip to content

Quick script to audit Google Drive files that are shared outside of your organization.

Notifications You must be signed in to change notification settings

christianherro/google-drive-audit-shared

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

google-drive-audit-shared

So there I was, not wanting to pay for G Suite Business or Enterprise, knowing zero Python, but hoping I could audit my shared files and find what had been shared outside my company.

Starting with @jameswthorne's blog post and script, I hacked around with the google drive API for far too long, and added a helper class found on @hayify's blog to do make life easier and added a pretty print for all the JSON things. And here we are today.


Parsing through the output can be fairly easily made into a usable list by:

sed -i "s/owners': \[{'emailAddress/OwnersEmailAddress/g" filename_1
egrep -v "'emailAddress': '([[:alnum:]_.-][email protected])'" filename_1 | grep -B 2 "'emailAddress'" > filename_2

@jameswthorne's original post that got me here: Find All Shared Files in Google Drive with a Python Script.

@hayify's helper class: Handling complex nested dicts in Python

About

Quick script to audit Google Drive files that are shared outside of your organization.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published