~/bin/gamadv-xtd3/gam redirect csv ./gam_report_output.csv report users fulldatarequired all allverifyuser REDA...@example.edu fields accounts:used_quota_in_mb,accounts:drive_used_quota_in_mb,accounts:gmail_used_quota_in_mb,accounts:gplus_photos_used_quota_in_mb,accounts:is_archived,accounts:is_disabled,accounts:is_suspended,accounts:last_login_time,accounts:last_sso_time
# get the list of emails from that report, and sort them.
awk -F "," '{print $1}' ./gam_report_output.csv | tail -n +2 | sort > gam_report_output_emails_sorted.csv
#get and sort the list of all users from gam print users
~/bin/gamadv-xtd3/gam redirect csv ./gam_print_users_output.csv print users
tail -n +2 ./gam_print_users_output.csv | sort > gam_print_users_output_sorted.csv
#use the linux comm command to get the list of just the users that were skipped in gam report users.
echo "primaryEmail" > gam_not_in_report.csv
comm -2 -3 gam_print_users_output_sorted.csv gam_report_output_emails_sorted.csv >> gam_not_in_report.csv
#use gam’s CSV input function to iterate through that list of “missed" users one by one.
~/bin/gamadv-xtd3/gam config process_wait_limit 360 auto_batch_min 1 redirect csv ./gam_not_in_report_users_storage.csv multiprocess csv gam_not_in_report.csv gam report users user ~primaryEmail fulldatarequired all allverifyuser REDA...@example.edu fields accounts:used_quota_in_mb,accounts:drive_used_quota_in_mb,accounts:gmail_used_quota_in_mb,accounts:gplus_photos_used_quota_in_mb,accounts:is_archived,accounts:is_disabled,accounts:is_suspended,accounts:last_login_time,accounts:last_sso_time
It turns out that on our sandbox instance (which has only 58 users) there was one user that was skipped. On our prod instance, 2,298 users are being skipped.
The results of doing this were interesting. For a bunch of the 2,298 users, I got "WARNING: Start date can not be earlier than 2023-04-03”; but for a lot of them it was able to report on usage. The strange bit is that for the “gam report users” output, the date was 2024-06-23 for all of the records. For the 2,298 missing ones, the date ranged from 2024-06-19 through 2024-06-23.
I’m not quite sure why I’m getting the WARNING: Start date can not be earlier than 2023-04-03 errors, though. It seems odd to me that accounts wouldn’t have the data I’m requesting in the report?
This is all still quite confusing (and concerning)….
Thanks,
Ian