Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print drivefileacls reporting alias addresses #297

Closed
ShaunNeighbourSwale opened this issue Sep 2, 2022 · 6 comments
Closed

Print drivefileacls reporting alias addresses #297

ShaunNeighbourSwale opened this issue Sep 2, 2022 · 6 comments

Comments

@ShaunNeighbourSwale
Copy link

Hi

I'm trying to tidy up a few hundred shared drives. I've noticed that "print drivefileacls" appears to report the user's original email address (which is a current alias), rather than their current email address.

@ShaunNeighbourSwale
Copy link
Author

This also appears to apply to "print teamdrives" - I've just run this against my suspended user OU, and this returned 0 results, even though I know there are suspended users still attached to shared drives.

During our suspension process, accounts are renamed so that new users are less likely to have an account name clash....

@ShaunNeighbourSwale
Copy link
Author

image
Example user. Tried "print teamdrives" with the current account email address and the alias email address.

@taers232c
Copy link
Owner

taers232c commented Sep 4, 2022 via email

@taers232c
Copy link
Owner

The Drive API doesn't return Shared Drives for suspended users.

$ gam update user testuser4 suspended true
User: testuser4@domain.com, Updated

$ gam user testuser4 show teamdrives
Getting all Shared Drives for testuser4@domain.com
Got 0 Shared Drives...
User: testuser4@domain.com, Show 0 Shared Drives

$ gam update user testuser4 suspended false
User: testuser4@domain.com, Updated

$ gam user testuser4 show teamdrives
Getting all Shared Drives for testuser4@domain.com
Got 1 Shared Drive...
User: testuser4@domain.com, Show 1 Shared Drive
  User: testuser4@domain.com, Shared Drive: T4 Shared Drive (0AJGEJZ5_1_WyUk9PVA)
    Shared Drive ID: 0AJGEJZ5_1_WyUkWXYZ
    Shared Drive Name: T4 Shared Drive
    hidden: False
    createdTime: 2022-09-04T15:44:07-07:00
    backgroundImageLink: https://ssl.gstatic.com/team_drive_themes/clams_background.jpg
    colorRgb: #e91e63                                                                                                                                                                                                                                                   
    role: organizer
    capabilities:
      canAddChildren: True
      canChangeCopyRequiresWriterPermissionRestriction: True
      canChangeDomainUsersOnlyRestriction: True
      canChangeDriveBackground: True
      canChangeDriveMembersOnlyRestriction: True
      canComment: True
      canCopy: True
      canDeleteChildren: True
      canDeleteDrive: True
      canDownload: True
      canEdit: True
      canListChildren: True
      canManageMembers: True
      canReadRevisions: True
      canRename: True
      canRenameDrive: True
      canResetDriveRestrictions: True
      canShare: True
      canTrashChildren: True
    restrictions:
      adminManagedRestrictions: False
      copyRequiresWriterPermission: False
      domainUsersOnly: False
      driveMembersOnly: False

@ShaunNeighbourSwale
Copy link
Author

ShaunNeighbourSwale commented Sep 5, 2022 via email

@taers232c
Copy link
Owner

taers232c commented Sep 6, 2022

Shaun,

See this: https://github.com/taers232c/GAM-Scripts3/blob/master/GetSuspendedUserSharedDriveACLs.py

I've updated the script to handle aliases for the suspended users.

Ross

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants