# Update GAMADV-XTD3 to latest version Automatic update to the latest version on Linux/Mac OS/Google Cloud Shell/Raspberry Pi/ChromeOS: - Do not create project or authorizations, default path `$HOME/bin` - `bash <(curl -s -S -L https://raw.githubusercontent.com/taers232c/GAMADV-XTD3/master/src/gam-install.sh) -l` - Do not create project or authorizations, specify a path - `bash <(curl -s -S -L https://raw.githubusercontent.com/taers232c/GAMADV-XTD3/master/src/gam-install.sh) -l -d ` By default, a folder, `gamadv-xtd3`, is created in the default or specified path and the files are downloaded into that folder. Add the `-s` option to the end of the above commands to suppress creating the `gamadv-xtd3` folder; the files are downloaded directly into the default or specified path. See [Downloads-Installs](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads-Installs) for Windows or other options, including manual installation ### 7.00.02 Added option `showlastmodification` to `gam print|show filecounts` that adds the following fields to the output: `lastModifiedFileId,lastModifiedFileName,lastModifyingUser,lastModifiedTime`; these are for the most recently modified file. Added option `keepforever []` to `gam update filerevisions` that allows setting `Keep forever` in revisions. Upgraded to Python 3.12.6 where possible. ### 7.00.01 Added option `shownames` to `gam print|show sheet` that causes GAM to make an additional API call to get and display the sheet file name that is not supplied by the Sheets API. ### 7.00.00 Merged GAM-Team version ### 6.81.02 Updated `gam update group postmaster@domain.com` to handle the error that is generated. ### 6.81.01 Fixed bug in `gam create meetspace` that caused errors due to Developer Preview options being included. ### 6.81.00 Added support for groups when defining Chrome policies. Added support for the Meet API. * See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Meet Added option `countsonly` to the following course commands that displays the number of items in a course but not the details of the items. ``` gam print course-announcements gam print course-materials gam print course-submissions gam print course-topics gam print course-work ``` ### 6.80.21 Updated `gam archive messages` to handle the following error: ``` googleapiclient.errors.MediaUploadSizeError: Media larger than: 26214400 ``` ### 6.80.20 Updated `gam report usage user` and `gam report users` to handle the following error: ``` ERROR: 503: serviceNotAvailable - The service is currently unavailable. ``` ### 6.80.19 Fixed bug in `gam create inboundssoprofile` that caused a trap due to an unexpected API result. Updated `gam create inboundssoprofile ... returnnameonly` to return `inProgress` if the API does not return a complete result. Upgraded to OpenSSL 3.3.2 where possible. ### 6.80.18 Updated `gam print|show admins` to handle the following error: ``` ERROR: 503: serviceNotAvailable - The service is currently unavailable. ### 6.80.17 Updated `gam modify messages` to improve error handling. ### 6.80.16 Fixed bug in `gam print vaultcounts` that caused a trap. ### 6.80.15 Fixed bug in `gam print filelist ... countsrowfilter` that caused a trap. Added option `continueoninvalidquery []` to `gam print filelist|filecounts` that can be used in special cases where a query of the form `query "'labels/mRoha85IbwCRl490E00xGLvBsSbkwIiuZ6PRNNEbwxyz' in labels" causes Google to issue an error saying that the query is invalid when, in fact, it is but the user does not have a license that suppprts drive file labels. When `continueoninvalidquery` is true, GAM prints an error message and proceeds to the next user rather that terminating as it does now. Of course, if the query really is invalid, you will get the message for every user. ### 6.80.14 Updated `gam print messages|threads` to display all default headers even if no messages are to be displayed. This eliminates error messages of the following form that occurred because only the headers `User,threadId,id` were displayed. ``` WARNING: csv_output_row_filter column "^Date$" does not match any output columns ``` ### 6.80.13 Added `my_publishable_items` to `` that can be used in `gam print filerevisions` to select only those items that can be published to the web: documents, forms, presentations(slides), spreadsheets. With row filtering, this allows identification of files that have been published outside your domain. * See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Drive-Files-Display#display-files-published-to-the-web ### 6.80.12 Updated `gam print vaultcounts` to correctly display accounts with errors. ### 6.80.11 Updated `gam delete|purge|trash|untrash shortcutandtarget` that when `]` to `gam print|show fileinfo|filepath ` that when true and `]` to `gam delete|purge|trash|untrash ` that when true and `)` to `gam print group-members` that display any custom schema values for the group members. ### 6.80.08 Updated `gam print|show oushareddrives` to display the Shared Drive ID, name and orgUnitPath as individual, separate entities in the output. ### 6.80.07 Updated `dateheaderformat iso` in `gam info|print|show messages` to include a colon between the hours and minutes in the timezone portion of the string as in all other time strings. ### 6.80.06 Added option `tdreturnidonly []` to `` that when true (the default), causes GAM to display only the uploaded file ID to stdout. This can be captured and used in subsequent commands, `tdfileid ` that will update the same file. ### 6.80.05 Added option `individualstudentcoursework copy|delete|maptoall` to `gam create|update course ... copyfrom` that controls how individual student coursework in the `copyfrom` course is processed. * `individualstudentcoursework copy` - Copy individual student coursework; this is the default. You will get an error if a student is not a member of the course * `individualstudentcoursework delete` - Delete individual student coursework * `individualstudentcoursework maptoall` - Map individual student coursework to all student coursework For convenience, setting `individualstudentassignments` sets all of the following to the same value: * `individualstudentannouncements` * `individualstudentmaterials` * `individualstudentcoursework` ### 6.80.04 Cleaned up progress messages in `gam create|update course ... copyfrom`. ### 6.80.03 Added option `stripcrsfromname` to `gam print driveactivity` that causes carriage returns, linefeeds and nulls to be stripped from file names. ### 6.80.02 Added option `addcsvdata ` to `gam print filecounts` that adds additional columns of data to the CSV file output. Added options `individualstudentannouncements copy|delete|maptoall` and `individualstudentmaterials copy|delete|maptoall` to `gam create|update course ... copyfrom` that controls how individual student announcements and materials in the `copyfrom` course are processed. * `individualstudentannouncements copy` - Copy individual student announcements; this is the default. You will get an error if a student is not a member of the course * `individualstudentannouncements delete` - Delete individual student announcements * `individualstudentannouncements maptoall` - Map individual student announcements to all student announcements * `individualstudentmaterials copy` - Copy individual student materials; this is the default. You will get an error if a student is not a member of the course * `individualstudentmaterials delete` - Delete individual student materials * `individualstudentmaterials maptoall` - Map individual student materials to all student materials ### 6.80.01 Added options `showstudentsaslist []` and `delimiter ` to `gam print course-work`. By default, when course work is assigned to individual students, the student IDs are displayed in multiple indexed columns. Use these options to display the student IDs in a single column as a delimited list. Updated `gam vacation []` to make `` optional; this allows changes to other fields without affecting the current responder state. Updated `gam print|show vacation` to avoid a trap when invalid start or end dates have been entered in the Gmail user interface. Invalid dates are represented as `1970-01-01`. ### 6.80.00 Fixed bug in `gam print users ... license ... formatjson` that caused a trap. Upgraded to Python 3.12.5 where possible. ### 6.79.12 Fixed bug in `gam user admin@domain.com print chatspaces asadmin` that caused the following error: ``` Chat Admin: admin@domain.com(asadmin), Print Failed: This method doesn't support non-admin user authentication. Authenticate with an admin account. ``` ### 6.79.11 Fixed bug in `gam print|show chatmembers` where the `filter ` was not applied. ### 6.79.10 Updated commands to handle a trap that occurs when oauth2service.json specifies a YubiKey but the YubiKey is not inserted. ### 6.79.09 Added option `addcsvdata ` to `gam print teamdriveacls` that adds additional columns of data to the CSV file output. This can be used when ACLs for selected users are to be replaced with a different user email address. * See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Shared-Drives#bulk-change-user1-shared-drive-access-to-user2 ### 6.79.08 Clarified action to perform messages when creating/deleting/updating licenses. ### 6.79.07 Added option `totalonly` to `gam print|show groups` that displays the user email address and the total number of groups to which it belongs. This is in contrast to `countsonly` that has to make an additional API call per group per user to get the user's role. When `countsonly` is specified, an additional column `Total` is displayed that is the sum of the role counts. ### 6.79.06 Fixed bug in `gam calendars update event ... removeattendee ` that caused a trap if the event had no attendees. ### 6.79.05 Updated `gam empty drivetrash ` to handle this error that occurs when the user is not a Manager of the Shared Drive. ``` ERROR: 403: insufficientFilePermissions - The user does not have sufficient permissions for this file. ``` ### 6.79.04 Added options `filename ` and `movetoou ` to `gam check ou ` that causes GAM to create a batch file of GAM commands that will move any remaining items in `ou ` to `movetoou `; executing the batch file will then allow `ou ` to be deleted if desired. ### 6.79.03 Added column|field `assignedToUnknown` to `gam print|show admins` that will be True when the API `assignedTo` value can not be converted to an email address; it will be False when the email address is determinable. ### 6.79.02 Updated `gam print admins` to handle the following error that occurs when a service account admin no longer exists. ``` ERROR: 404: notFound - Requested entity was not found. ``` ### 6.79.01 Updated commands that take `` as an argument to take the value in any case, e.g., _SEED_ADMIN_ROLE or _seed_admin_role. ### 6.79.00 Updated code to work around a Cryptography library change that caused service account private key creation to fail. ### 6.78.00 Added command to check if an OU contains items; this is useful when tryng to delete an OU as it must not contain any items in order to be deleted. * See: https://github.com/taers232c/GAMADV-XTD3/wiki/Organizational-Units#check-organizational-unit-for-contained-items ### 6.77.18 Added option `showitemcountonly` to `gam print domainaliases` that causes GAM to display the number of domain aliasess on stdout; no CSV file is written. ### 6.77.17 Added option `showitemcountonly` to `gam print domains` that causes GAM to display the number of domains on stdout; no CSV file is written. ### 6.77.16 Fixed bug in `gam print filelist` that caused a trap. ### 6.77.15 Updated `gam calendars import event icaluid json ` to handle API constraints on recurring events. ### 6.77.14 Fixed bug in `gam calendars import event icaluid json ` that caused an error. ### 6.77.13 Updated `gam print|show filecounts` to reflect that Shared Drives now have a capacity of 500000 files/folders/shortcuts. ### 6.77.12 Fixed bug in `gam print chatspaces todrive` that caused an error. ### 6.77.11 Added option `convertmbtogb` to `gam report usage customer|user` and `gam report customer|user` that causes GAM to convert parameters expressed in megabytes (name ends with _in_mb) to gigabytes (name converted to _in_gb) with two decimal places. ### 6.77.10 Fixed bug in `gam get profilephoto` where data written to stdout, e.g. `> filename`, was not properly base64 encoded. ### 6.77.09 Added option `usertokencounts` to `gam print|show tokens` that causes GAM to display each user and their number of access tokens; there are no details. ### 6.77.08 Fixed bugs in `gam delete chatmember ... group ` and `gam sync chatmember ... groups ` that caused an error. ### 6.77.07 Fixed bug in `gam create chatmember ... group ` that caused an error. ### 6.77.06 Updated `gam update ou ... parent ` to handle the following error that occurs when `parent ` is the same as or a sub-OU of `ou `. ``` ERROR: 412: conditionNotMet - OrgUnit hierarchy has cycle ``` ### 6.77.05 Added option `onlyusers ` to `gam claim ownership ` that causes GAM to only claim ownership of files/folders owned by `onlyusers `. This option is multually exclusive with `skipusers `. ### 6.77.04 Fixed bug in `gam report users ... range ` where an extraneous API call was made if a date was reached where no API data was available. ### 6.77.03 Thanks to jay, added the following Colab License SKUs: ``` 1010500001 - Colab Pro 1010500002 - Colab Pro+ ``` Thanks to Jay, updated `gam print|show admins` to properly display addresses of service accounts with admin role assignments. Added option `limitdatechanges ` to `gam report users|customers`. If no report is available for the specified date, can an earlier date be used? * `limitdatechanges -1' - Back up to earlier dates to find report data; this is the default. * `limitdatechanges 0 | nodatechange' - Do not report on an earlier date if no report data is available for the specified date. * `limitdatechanges N' - Back up to earlier dates to find report data; do not back up more than N times. By default, when `gam report user user ` is specified and no report data is available, there is no output. If `csv_output_users_audit = true` in `gam.cfg`, then a row with columns `email,date` will be displayed where `date` is the earliest date for which report data was requested. ### 6.77.02 Cleaned up problems with some of the new Chat API asadmin commands. Some remaining problems may require a Google fix. ### 6.77.01 Thanks to Jay, added column `verificationCodesCount` to `gam print backupcodes` that displays the number of available backup codes in addtion to the codes. Added option `countsonly` that displays only the number of available backup codes but not the codes themselves. Thanks to Jay, added option `nokey` to `gam create project` that creates a project with no service account key, `oauth2service.json`. ### 6.77.00 Added option `individualstudentassignments copy|delete|maptoall` to `gam create|update course ... copyfrom` that controls how individual student assignments in the `copyfrom` course are processed. * `individualstudentassignments copy` - Copy individual student assignments; this is the default. You will get an error if the student is not a member of the course. * `individualstudentassignments delete` - Delete individual student assignments * `individualstudentassignments maptoall` - Map individual student assignments to all student assignments Upgraded to Python 3.12.4 where possible. Added option `asadmin` to the following Chat commands that allows admin access. These commands are in Developer Preview, your project must have Developer Preview enabled for the Chat API in order to use these commands. ``` gam delete chatspace asadmin gam update chatspace asadmin gam info chatspace asadmin gam print|show chatspaces asadmin gam create chatmember asadmin gam delete|remove chatmember asadmin gam update|modify chatmember asadmin gam sync chatmembers asadmin gam info chatmember asadmin gam print|show chatmembers|asadmin ``` * See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Chat#developer-preview-admin-access Added `use_chat_admin_access` Boolean variable to `gam.cfg`. ``` * When False, GAM uses user access when making all Chat API calls. For calls that support admin access, this can be overridden with the asadmin command line option. * When True, GAM uses admin access for Chat API calls that support admin access; other calls will use user access. * Default: False ``` ### 6.76.15 Fixed bug in `gam print|show filesharecounts summary only summaryuser ` that printed an erroneous row if `` specified a single user and `` matched the user's email address. ### 6.76.14 Added the following Gemini License SKUs: ``` 1010470004 - Gemini Education 1010470005 - Gemini Education Premium ``` ### 6.76.13 Updated `gam show fileinfo ... showlabels` and `gam print filelist ... showlabels` to retry these errors that occur when trying to get the drive labels for a file/folder. ``` ERROR: 500: unknownError - Unknown Error. ERROR: 503: serviceNotAvailable - The service is currently unavailable. ``` Upgraded to OpenSSL 3.3.1 where possible. ### 6.76.12 Fixed bug in `gam print|show chatspaces` that caused the following error: ``` ERROR: Got an unexpected keyword argument orderBy ``` ### 6.76.11 Thanks to Jay, added `gam report vault`. Thanks to Jay, added the following Gemini SKUs: ``` 1010470006 - AI Security 1010470007 - AI Meetings and Messaging ``` Updated `gam print filelist ... showshareddrivepermissions` to display progress messages to stderr as a separate API call must be made for every file/folder on the Shared Drive to get its permissions. As this can take a long time, the progress messages indicate that progress is being made. ### 6.76.10 Added `fromgmail` to `` that can be used in `gam calendars print|show events ... eventtype fromgmail`. * See: https://workspaceupdates.googleblog.com/2024/05/google-calendar-api-event-type-fromgmail.html ### 6.76.09 Updated `gam update|delete|info adminrole` to handle the following error: ``` ERROR: 400: failedPrecondition - Precondition check failed. ``` ### 6.76.08 Updated `` to `"|(,|)*"` that allows `schemas ` in `gam info user` and `gam print users` to display all fields or selected fields of the specified custom schemas. ### 6.76.07 Fixed bug where control-C was not recognized when GAM had processed all rows in a CSV file and was `Waiting for N running processes to finish before terminating`. ### 6.76.06 Fixed bug in `gam print messages ... positivecountsonly` where message counts with value 0 were deiplayed. Added option `addcsvdata ` to `gam print|messages` that adds additional columns of data to the CSV file output. Added option `showusagebytes` to `gam print|show drivesettings` that displays the following fields in bytes ```usageBytes,usageInDriveBytes,usageInDriveTrashBytes``` in addition to the fields in their formatted form with units: ```usage,usageInDrive,usageInDriveTrash```. This will be most useful with `print` as the rows can be sorted based on the `usagexxxBytes` columns. ### 6.76.05 Added options `deletefromoldowner`, `addtonewowner *` and `nolistmessages` to `gam transfer calendars ` that allow manipulation of the source and target user's calendar lists. * See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Calendars-Access#transfer-calendar-ownership ### 6.76.04 Added the following fields to ``: ``` autoupdatethrough extendedsupporteligible extendedsupportstart extendedsupportenabled ``` ### 6.76.03 Added option `folderpathonly []` to the following commands that causes GAM to display only the folder names when displaying the path to a file. This folder only path an be used in `gam create drivefolderpath` to recreate the folder hierarchy. ``` gam info drivefile ... filepath|fullpath gam show fileinfo ... filepath|fullpath gam print|show filepath gam print filelist ... filepath|fullpath ``` ### 6.76.02 Updated `gam update group` to handle the following error: ``` ERROR: 400: invalidArgument - Failed request validation in update settings: WHO_CAN_VIEW_MEMBERSHIP_CANNOT_BE_BROADER_THAN_WHO_CAN_SEE_GROUP ``` ### 6.76.01 Fixed bug in `gam create vaulthold matter ... corpus calendar` that caused a trap. ### 6.76.00 Updated versions of `gam create|use project` that use keyword options to also accept the following options to define non-default Service Account key characteristics. ``` (algorithm KEY_ALG_RSA_1024|KEY_ALG_RSA_2048)| (localkeysize 1024|2048|4096 [validityhours ])| (yubikey yubikey_pin yubikey_slot AUTHENTICATION yubikey_serialnumber ) ``` ### 6.75.05 Added option `csv [todrive *]` to `gam archive|delete|modify|spam|trash|untrash messages|threads` that causes GAM to display the command results in CSV form. ### 6.75.04 Added a command to print user counts by OrgUnit. By default, all users in the workspace are counted; you can specify a domain to only count users in that domain. ``` gam print usercountsbyorgunit [todrive *] [domain ] ``` Added option `uploadattachments []` to `gam show messages|threads` that causes GAM to upload all message attachments to the user's `My Drive`, the default, or to a specific folder. The existing option `attachmentnamepattern ` can be used to select attachments to upload. ### 6.75.03 Fixed bug in `gam batch|tbatch` where the line `sleep ` in the batch file caused the error: ``` ERROR: Invalid argument: Expected ``` ### 6.75.02 Updated `gam report ` to retry/handle the following error: ``` ERROR: 503: serviceNotAvailable - The service is currently unavailable. ``` ### 6.75.01 Added option `admin ` to `gam upload sakey`. ### 6.75.00 Updated `gam create project` to simplify handling the situation where your workspace is configured to disable service account private key uploads. Added command `gam upload sakey` to aid in this process. * See: https://github.com/taers232c/GAMADV-XTD3/wiki/Authorization#upload-a-service-account-key-to-a-service-account-with-no-keys ### 6.74.02 Fixed bug in `gam print shareddrives ... formatjson` that caused a trap. ### 6.74.01 Updated `gam create|update drivefileacl ... expiration