When people leave our organisation we suspend
their accounts for a period of 365 days before deleting them. The issue we’re
facing is that some files are still being shared from these users’ Google Drives
without the person accessing the file knowing the file is owned by a person who
has left the organisation. The person accessing the file is not aware that the
file is at risk of being deleted at some point in the future when the owner’s
account is deleted.
I’ve been struggling with gamadv-xtd3 to report on these files. I’ve detailed
my approach below (it may well not be the best way to do this. . . )
Many organisations have these sort of issues; I started here in trying to identify
the files that are at risk:
https://groups.google.com/g/google-apps-manager/c/kO0w3azhaAY?pli=1
I’ve had to break this down and run this on a per user basis as due to the
amount of the information retrieved I can’t do all files from all accounts at
once as GAM runs into memory issues.
(Please excuse the inelegant and inefficient code below :-) )
gam.exe redirect csv ./SuspendedUsersAll.csv multiprocess all users_susp print fields username
SETLOCAL EnableDelayedExpansion
for /f "Tokens=* Delims=" %%x in (SuspendedUsersAll.csv) do (
set User=!Build!%%x
Echo %%x
gam.exe config auto_batch_min 1 csv_output_header_drop_filter "'.*photoLink'" user %%x print filelist pm not role owner em fields id,name,permissions > SuspendedFiles.csv
python.exe MakeOneItemPerRowACLs.py ./SuspendedFiles.csv >> SuspendedFileACLs.csv
)
grep -v "Owner,id,title," SuspendedFileACLs.csv > SuspendedFileACLs01.csv
--
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/9d58c5ca-b422-4043-af3d-1e4113438248n%40googlegroups.com.