Mass deletion of Google Shared Drive users

197 views
Skip to first unread message

Brokamp, Kevin M

unread,
Apr 17, 2023, 4:18:45 PM4/17/23
to google-ap...@googlegroups.com

Hey all,

 

Stumbling my way through this so I figured I’d ask the community.

 

What is the most efficient way of listing and then deleting all users/members/roles from a given set of Google Shared Drives? 

 

We’ve given our users plenty of time to either migrate their data out of shared drives or pay for storage in our Google instance and would like to use GAMADV-XTD3 to delete all remaining users from the set of drives who haven’t gone through the payment process.  Note that removing all users from these drives is the very last step before we delete the drives entirely/free up some quota space.  As of now, we’re planning to keep the data in our instance for 6-12 months as a fail-safe.

 

Just trying to flesh out the best way to go about this process.

 

Thanks!

Kevin

 

Kevin Brokamp
Principal Online Systems Administrator
Pronouns: He/Him/His
“Injustice anywhere is a threat to justice everywhere.” –MLK 

Hear my name
kmbr...@iu.edu
317.274.8401
teachingonline.iu.edu

 

Ross Scroggs

unread,
Apr 17, 2023, 5:46:29 PM4/17/23
to google-ap...@googlegroups.com
Kevin,

Let's assume a CSV file SharedDriveCleanup.csv with a column id that identifies the Shared Drives of interest.

Get the ACLs for those Shared Drives.
gam redirect csv ./SharedDriveACLs.csv multiprocess csv SharedDriveCleanup.csv gam print drivefileacls "~id" oneitemperrow

Delete the ACLs
gam redirect stdout ./SharedDriveDeletedACLs.csv multiprocess redirect stderr stdout csv ./SharedDriveACLs.csv gam delete drivefileacl "~id" "id:~~permission.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.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/MW5PR08MB8241859F8E3B6BCDD9EAA911A29C9%40MW5PR08MB8241.namprd08.prod.outlook.com.


--

Brokamp, Kevin M

unread,
Apr 18, 2023, 8:36:36 AM4/18/23
to google-ap...@googlegroups.com

Ross,

 

Thanks so much for getting back so quickly…I get to the last step in the process and this is what I see in the log when I run it on a test shared drive:

 

Permission ID: 1622953668056960000

Does not exist

 

Any helpful hints?

 

Best,

Kevin

Kevin Brokamp
Principal Online Systems Administrator
Pronouns: He/Him/His
“Injustice anywhere is a threat to justice everywhere.” –MLK 

Hear my name
kmbr...@iu.edu
317.274.8401
teachingonline.iu.edu

 

From: google-ap...@googlegroups.com <google-ap...@googlegroups.com> On Behalf Of Ross Scroggs
Sent: Monday, April 17, 2023 5:46 PM
To: google-ap...@googlegroups.com
Subject: [External] Re: [GAM] Mass deletion of Google Shared Drive users

 

This message was sent from a non-IU address. Please exercise caution when clicking links or opening attachments from external sources.

Reply all
Reply to author
Forward
0 new messages