gam redirect csv ./TeamDriveMembers.csv print drivefileacls <TeamDriveID> oneitemperrow
Test
gam csv ./TeamDriveMembers.csv matchfield permission.role "(reader)|(member)|(viewer)" gam info drivefileacl ~id id:~~permission.id~~
Do it
gam csv ./TeamDriveMembers.csv matchfield permission.role "(reader)|(member)|(viewer)" gam delete drivefileacl ~id id:~~permission.id~~
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/c03f1073-6f4e-47c2-9b00-ab59b2525da5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
James,You delete by permission ID or email address, not role.With GAMADV-XTD you would do something like this:gam redirect csv ./TeamDriveMembers.csv print drivefileacls <TeamDriveID> oneitemperrow
Test
gam csv ./TeamDriveMembers.csv matchfield permission.role "(reader)|(member)|(viewer)" gam info drivefileacl ~id id:~~permission.id~~
Do it
gam csv ./TeamDriveMembers.csv matchfield permission.role "(reader)|(member)|(viewer)" gam delete drivefileacl ~id id:~~permission.id~~
Ross
On Wed, Mar 6, 2019 at 9:56 PM 'James SEYMOUR' via GAM for G Suite <google-ap...@googlegroups.com> wrote:
I am trying to look for a way to delete the members of a TeamDrive. One of our teachers has created a TeamDrive and added a lot of individual students and reached the 500 limit of individuals allowed to be added to a TeamDrive. So now we need to look at an easy way to remove them (and then look at adding groups).--As a test (before converting to run through a CSV file) I have entered this GAM command with the role as reader, member or viewer. The term Viewer is used in Admin Console and the other 2 appear in the info created from GAM, see below.permissions.50.teamDrivePermissionDetails.0.role readerpermissions.50.teamDrivePermissionDetails.0.teamDrivePermissionType memberCommand Rungam user <user email address> delete permissions teamdriveid <Team Drive ID> <role>OutputUser: studen...@jis.edu.bn, Delete 1 Drive File/Folder ACLDrive File/Folder ID: 0AIMsBtUzR01IUk9PVA, Delete 1 Permission IDDrive File/Folder ID: 0AIMsBtUzR01IUk9PVA, Permission ID: viewer, Does not existAll roles give the same output. Am I missing something or do I need to approach this another way?
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.
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/c03f1073-6f4e-47c2-9b00-ab59b2525da5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Ross Scroggs
$: gam delete drivefileacl 0AFWGyAaQnrycUk9PVA 17232547134505802408User: zack.mccauley@bsd7.org, Delete 1 Drive File/Folder ACL
User: zack.mccauley@bsd7.org, Drive File/Folder ID: 0AFWGyAaQnrycUk9PVA, Permission ID: 08037643876042470314i, Does not existgam print drivefileacls 0AFWGyAaQnrycUk9PVA oneitemperrow
Owner,id,permission.deleted,permission.displayName,permission.domain,permission.emailAddress,permission.id,permission.permissionDetails,permission.permissionDetails.0.inherited,permission.permissionDetails.0.permissionType,permission.permissionDetails.0.role,permission.photoLink,permission.role,permission.teamDrivePermissionDetails,permission.teamDrivePermissionDetails.0.inherited,permission.teamDrivePermissionDetails.0.role,permission.teamDrivePermissionDetails.0.teamDrivePermissionType,permission.type
zack.mccauley@bsd7.org,0AFWGyAaQnrycUk9PVA,False,Zack McCauley,bsd7.org,zack.mccauley@bsd7.org,17232547134505802408,1,False,member,organizer,https://lh6.googleusercontent.com/-FPHhZjnLKnE/AAAAAAAAAAI/AAAAAAAAAYY/O1DqmgJIq10/s64/photo.jpg,organizer,1,False,organizer,member,user--
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/02c6001f-1cd9-4cde-af96-431f96bcdac4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.