diff --git a/docs/Calendars-Events.md b/docs/Calendars-Events.md index 0dfb049b..20578bd4 100644 --- a/docs/Calendars-Events.md +++ b/docs/Calendars-Events.md @@ -176,6 +176,7 @@ Client access works when accessing Resource calendars. ::= accepted|declined|needsaction|tentative ::= + birthday| default| focustime| fromgmail| @@ -241,6 +242,7 @@ Client access works when accessing Resource calendars. (attendee )| (attendeestatus [] [] )| available| + (birthday )| (color )| (colorindex|colorid )| (description )| diff --git a/docs/Chrome-Policies.md b/docs/Chrome-Policies.md index 479ab44c..b62511c7 100644 --- a/docs/Chrome-Policies.md +++ b/docs/Chrome-Policies.md @@ -7,7 +7,7 @@ - [Definitions](#definitions) - [Display a specific Chrome policy schema](#display-a-specific-chrome-policy-schema) - [Display all or filtered Chrome policy schemas](#display-all-or-filtered-chrome-policy-schemas) - - [Display Chrome policy schemas in same format as Standard GAM](#display-chrome-policy-schemas-in-same-format-as-standard-gam) + - [Display Chrome policy schemas in same format as Legacy GAM](#display-chrome-policy-schemas-in-same-format-as-legacy-gam) - [Create a Chrome policy image](#create-a-chrome-policy-image) - [Update Chrome policy](#update-chrome-policy) - [Delete Chrome policy](#delete-chrome-policy) @@ -118,7 +118,7 @@ When using the `formatjson` option, double quotes are used extensively in the da The `quotechar ` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output. `quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used. -## Display Chrome policy schemas in same format as Standard GAM +## Display Chrome policy schemas in same format as Legacy GAM ``` gam show chromeschemas std [filter ] diff --git a/docs/ChromeOS-Devices.md b/docs/ChromeOS-Devices.md index 2a918bfb..242039ef 100644 --- a/docs/ChromeOS-Devices.md +++ b/docs/ChromeOS-Devices.md @@ -71,7 +71,7 @@ gam cros ... ``` The first form allows more powerful selection of devices with ``. -The second form is backwards compatible with Standard GAM and selection with `` is limited. +The second form is backwards compatible with Legacy GAM and selection with `` is limited. ## Definitions * [``](Collections-of-ChromeOS-Devices) @@ -465,7 +465,7 @@ gam getcommand cros commandid [times_to_check_status will work only with GAMADV-XTD3. +Commands with issuecommand directly after gam will work with Legacy GAM & GAMADV-XTD3, whereas commands where the issuecommand is after the cros will work only with GAMADV-XTD3. ``` gam issuecommand cros dd1d659a-0ea4-4e94-905e-4726c7a5f1e9 command wipe_users doit ``` diff --git a/docs/Collections-of-ChromeOS-Devices.md b/docs/Collections-of-ChromeOS-Devices.md index c476917b..7cfad1b4 100644 --- a/docs/Collections-of-ChromeOS-Devices.md +++ b/docs/Collections-of-ChromeOS-Devices.md @@ -50,6 +50,8 @@ ::= ||( ) + + ::= |id: ::= ||( ) diff --git a/docs/Collections-of-Users.md b/docs/Collections-of-Users.md index 3a18f898..3963fd23 100644 --- a/docs/Collections-of-Users.md +++ b/docs/Collections-of-Users.md @@ -55,6 +55,8 @@ ::= ||( ) + + ::= |id: ::= ||( ) ``` @@ -88,8 +90,6 @@ | - ::= |id: - ::= (all users|users_ns|users_susp|users_ns_susp)| (user )| diff --git a/docs/Downloads-Installs-GAM7.md b/docs/Downloads-Installs-GAM7.md new file mode 100644 index 00000000..7c75f9ae --- /dev/null +++ b/docs/Downloads-Installs-GAM7.md @@ -0,0 +1,56 @@ +# Downloads-Installs-GAM7 +You can download and install the current GAM7 release from the [GitHub Releases](https://github.com/GAM-team/GAM/releases/latest) page. +Choose one of the following: + +* Executable Archive, Automatic, Linux/Mac OS/Google Cloud Shell/Raspberry Pi/ChromeOS + - Start a terminal session and execute one of the following commands: + - New install, default path `$HOME/bin` + - `bash <(curl -s -S -L https://git.io/gam-install)` + - New install, specify a path + - `bash <(curl -s -S -L https://git.io/gam-install) -d ` + - Update to latest version, do not create project or authorizations, default path `$HOME/bin` + - `bash <(curl -s -S -L https://git.io/gam-install) -l` + - Update to latest version, do not create project or authorizations, specify a path + - `bash <(curl -s -S -L https://git.io/gam-install) -l -d ` + +By default, a folder, `gam7`, 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 `gam7` folder; the files are downloaded directly into the default or specified path. + +* Executable Archive, Manual, Linux/Google Cloud Shell + - `gam-7.wx.yz-linux-x86_64-glibc2.35.tar.xz` + - `gam-7.wx.yz-linux-x86_64-glibc2.31.tar.xz` + - `gam-7.wx.yz-linux-x86_64-legacy.tar.xz` + - Download the archive, extract the contents into some directory. + - Start a terminal session. + +* Executable Archive, Manual, Raspberry Pi/ChromeOS ARM devices + - `gam-7.wx.yz-linux-aarch-glibc2.31.tar.xz` + - `gam-7.wx.yz-linux-aarch-legacy.tar.xz` + - Download the archive, extract the contents into some directory. + - Start a terminal session. + +* Executable Archive, Manual, Mac OS versions Big Sur, Monterey, Ventura - M1/M2 + - `gam-7.wx.yz-macos-aarch.tar.xz` + - Download the archive, extract the contents into some directory. + - Start a terminal session. + +* Executable Archive, Manual, Mac OS, versions Big Sur, Monterey, Ventura - Intel + - `gam-7.wx.yz-macos-x86_64.tar.xz` + - Download the archive, extract the contents into some directory. + - Start a terminal session. + +* Executable Archive, Manual, Windows 64 bit + - `gam-7.wx.yz-windows-x86_64.zip` + - Download the archive, extract the contents into some directory. + - Start a Command Prompt/PowerShell session. + +* Executable Installer, Manual, Windows 64 bit + - `gam-7.wx.yz-windows-x86_64.msi` + - Download the installer and run it. + - Start a Command Prompt/PowerShell session. + +* Source, all platforms + - `Source code(zip)` + - `Source code(tar.gz)` + - Download the archive, extract the contents into some directory. + - Start a terminal/Command Prompt/PowerShell session. diff --git a/docs/Drive-REST-API-v3.md b/docs/Drive-REST-API-v3.md index a74978fa..4b87873a 100644 --- a/docs/Drive-REST-API-v3.md +++ b/docs/Drive-REST-API-v3.md @@ -4,7 +4,7 @@ Many of the changes are internal to Gam and have no visible effect. Google has m A variable, `drive_v3_native_names` (default value is True), has been added to `gam.cfg` to control the field names on output: when True, the v3 native field names are used; when False, the v3 native field names are mapped to the v2 field names. If you have scripts that process the output from these print commands, you may have to make modifications to your scripts. -Run your print/show commands with a version of Standard Gam and save the output. +Run your print/show commands with a version of Legacy Gam and save the output. With drive_v3_native_names = False, run your print/show commands with this version of Gam and compare the output to that saved in the previous run; modify your scripts that process the output as appropriate. diff --git a/docs/GamUpdates.md b/docs/GamUpdates.md index 1a53606b..321c1a61 100644 --- a/docs/GamUpdates.md +++ b/docs/GamUpdates.md @@ -10,6 +10,22 @@ Add the `-s` option to the end of the above commands to suppress creating the `g See [Downloads-Installs](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads-Installs) for Windows or other options, including manual installation +### 7.00.04 + +Improved performance of `gam report users orgunit ` when `showorgunit` is not specified. + +Added option `birthday ` to `gam create event ` that adds +an annual recurring event to the calendar. + +Added `birthday` to `` for use in various calendar event commands. + +### 7.00.03 + +Updated `gam delete ou` and `gam print admins` to handle the following error: +``` +ERROR: 503: serviceNotAvailable - The service is currently unavailable. +``` + ### 7.00.02 Added option `showlastmodification` to `gam print|show filecounts` that adds diff --git a/docs/Groups-Membership.md b/docs/Groups-Membership.md index e17dfcf3..851a0e09 100644 --- a/docs/Groups-Membership.md +++ b/docs/Groups-Membership.md @@ -25,6 +25,24 @@ ## Definitions See [Collections of Items](Collections-of-Items) + +* [Command data from Google Docs/Sheets/Storage](Command-Data-From-Google-Docs-Sheets-Storage) +``` + ::= + ::= + ::= + https://storage.cloud.google.com//| + https://storage.googleapis.com//| + gs:///| + / + + ::= + ||( ) + + ::= |id: + ::= + ||( ) +``` ``` ::= allmail| diff --git a/docs/Home.md b/docs/Home.md index d05ef90a..2e960b4a 100644 --- a/docs/Home.md +++ b/docs/Home.md @@ -1,8 +1,7 @@ - [Introduction](#introduction) - [Requirements](#requirements) - [Installation - First time GAM installation](#installation---first-time-gam-installation) -- [Installation - Upgrading from a GAM version other than a prior version of GAMADV-X or GAMADV-XTD or GAMADV-XTD3](#installation---upgrading-from-a-gam-version-other-than-a-prior-version-of-gamadv-x-or-gamadv-xtd-or-gamadv-xtd3) -- [Installation - Upgrading from a prior version of GAMADV-X or GAMADV-XTD or GAMADV-XTD3](#installation---upgrading-from-a-prior-version-of-gamadv-x-or-gamadv-xtd-or-gamadv-xtd3) +- [Installation - Upgrading from Legacy GAM](#installation---upgrading-from-legacy-gam) # Introduction GAMADV-XTD3 is a free, open source command line tool for Google Workspace Administrators to manage domain and user settings quickly and easily. @@ -43,20 +42,13 @@ and all necessary authentications. * Configuration: [GAM Configuration](gam.cfg) * Install: [How to Install Advanced GAM](How-to-Install-Advanced-GAM) -# Installation - Upgrading from a GAM version other than a prior version of GAMADV-X or GAMADV-XTD or GAMADV-XTD3 +# Installation - Upgrading from Legacy GAM Use these steps if you have used any version of GAM in your domain. They will update your GAM project and all necessary authentications. * Download: [Downloads-Installs](Downloads-Installs) * Configuration: [GAM Configuration](gam.cfg) -* Upgrade: [How to Upgrade from Standard GAM](How-to-Upgrade-from-Standard-GAM) - -# Installation - Upgrading from a prior version of GAMADV-X or GAMADV-XTD or GAMADV-XTD3 -Use these steps if you already use GAMADV-X or GAMADV-XTD or GAMADV-XTD3. The updates may tell you to update your GAM project -or authentications because new features have been included. - -* Updates: [GAM Updates] -* Download: [Downloads-Installs](Downloads-Installs) +* Upgrade: [How to Upgrade from Legacy GAM](How-to-Upgrade-from-Legacy-GAM) You can install multiple versions of GAM and GAMADV-XTD3 in different parallel directories. diff --git a/docs/How-to-Update-Advanced-GAM-to-GAM7.md b/docs/How-to-Update-Advanced-GAM-to-GAM7.md new file mode 100644 index 00000000..a103a7fe --- /dev/null +++ b/docs/How-to-Update-Advanced-GAM-to-GAM7.md @@ -0,0 +1,120 @@ +# Installation - Update Advanced GAM to GAM7 + +- [Downloads-Installs-GAM7](Downloads-Installs-GAM7) +- [Linux and MacOS and Google Cloud Shell](#linux-and-mac-os-and-google-cloud-shell) +- [Windows](#windows) + +## Linux and MacOS and Google Cloud Shell + +This example assumes that GAMADV-XTD3 was installed in /Users/admin/bin/gamadv-xtd3. +If GAMADV-XTD3 was installed in another directory, substitute that value in the directions. + +Rename install directory. +``` +mv /Users/admin/bin/gamadv-xtd3 /Users/admin/bin/gam7 +``` + +See: [Downloads-Installs-GAM7](Downloads-Installs-GAM7) + +You can download and install the current GAM7 release from the [GitHub Releases](https://github.com/GAM-team/GAM/releases/latest) page. Choose one of the following: + +* Executable Archive, Automatic, Linux/Mac OS/Google Cloud Shell/Raspberry Pi/ChromeOS + - Start a terminal session and execute one of the following commands: + - Update to latest version, do not create project or authorizations, default path `$HOME/bin` + - `bash <(curl -s -S -L https://git.io/gam-install) -l` + - Update to latest version, do not create project or authorizations, specify a path + - `bash <(curl -s -S -L https://git.io/gam-install) -l -d ` + +In these examples, the user home folder is shown as /Users/admin; adjust according to your +specific situation; e.g., /home/administrator. + +### Update gam alias +You should set an alias to point to /Users/admin/bin/gam/gam so you can operate from the /Users/admin/GAMWork directory. +Aliases aren't available in scripts, so you may want to set a symlink instead, see below. + +Change the following line: +``` +alias gam="/Users/admin/bin/gamadv-xtd3/gam" +``` +to +``` +alias gam="/Users/admin/bin/gam7/gam" +``` +in one of these files based on your shell: +``` +~/.bash_aliases +~/.bash_profile +~/.bashrc +~/.zshrc +~/.profile +``` + +Issue the following command replacing `` with the name of the file you edited: +``` +source +``` + +### Set a symlink if desired +Set a symlink in `/usr/local/bin` (or some other location on $PATH) to point to GAM. +``` +ln -s "/Users/admin/bin/gam7/gam" /usr/local/bin/gam +``` + +### Test +``` +gam version +``` + +## Windows + +You can download and install the current GAM7 release from the [GitHub Releases](https://github.com/GAM-team/GAM/releases/latest) page. + +This example assumes that GAMADV-XTD3 was installed in C:\GAMADV-XTD3. +If GAMADV-XTD3 was installed in another directory, substitute that value in the directions. + +These steps assume Command Prompt, adjust if you're using PowerShell. + +Rename install directory. +``` +ren C:\GAMADV-STD3 C:\GAM7 +``` + +See: [Downloads-Installs-GAM7](Downloads-Installs-GAM7) + +* Executable Archive, Manual, Windows 64 bit + - `gam-7.wx.yz-windows-x86_64.zip` + - Download the archive, extract the contents into C:\GAM7. + - Start a Command Prompt/PowerShell session. + +* Executable Installer, Manual, Windows 64 bit + - `gam-7.wx.yz-windows-x86_64.msi` + - Download the installer and run it. + - Start a Command Prompt/PowerShell session. + +### Update system path +You should set the system path to point to C:\GAM7 so you can operate from the C:\GAMWork directory. +``` +Start Control Panel +Click System +Click Advanced system settings +Click Environment Variables... +Click Path under System variables +Click Edit... +If you have an existing entry referencing GAMADV-XTD3: + Click that entry + Click Delete +If C:\GAM7 is already on the Path, skip the next three steps + Click New + Enter C:\GAM7 + Click OK +Click OK +Click OK +Exit Control Panel +``` + +At this point, you should restart Command Prompt so that it has the updated path and environment variables. + +### Test +``` +gam version +``` diff --git a/docs/How-to-Upgrade-from-Legacy-GAM.md b/docs/How-to-Upgrade-from-Legacy-GAM.md new file mode 100644 index 00000000..2fb67d41 --- /dev/null +++ b/docs/How-to-Upgrade-from-Legacy-GAM.md @@ -0,0 +1,1262 @@ +# Installation - Upgrading from Legacy GAM +Use these steps if you have used any version of GAM in your domain. They will update your GAM project +and all necessary authentications. + +- [Downloads-Installs](Downloads-Installs) +- [Linux and MacOS and Google Cloud Shell](#linux-and-mac-os-and-google-cloud-shell) +- [Windows](#windows) +- [GAM Configuration](gam.cfg) + +## Linux and MacOS and Google Cloud Shell + +In these examples, your Google Super admin is shown as admin@domain.com; replace with the +actual email adddress. + +In these examples, the user home folder is shown as /Users/admin; adjust according to your +specific situation; e.g., /home/administrator. + +This example assumes that GAMADV-XTD3 has been installed in /Users/admin/bin/gamadv-xtd3. +If you've installed GAMADV-XTD3 in another directory, substitute that value in the directions. + +### Set a configuration directory + +The default GAM configuration directory is /Users/admin/.gam; for more flexibility you +probably want to select a non-hidden location. This example assumes that the GAM +configuration directory will be /Users/admin/GAMConfig; If you've chosen another directory, +substitute that value in the directions. + +Make the directory: +``` +mkdir -p /Users/admin/GAMConfig +``` + +Add the following line: +``` +export GAMCFGDIR="/Users/admin/GAMConfig" +``` +to one of these files based on your shell: +``` +~/.bash_profile +~/.bashrc +~/.zshrc +~/.profile +``` + +Issue the following command replacing `` with the name of the file you edited: +``` +source +``` + +You need to make sure the GAM configuration directory actually exists. Test that like this: +``` +ls -l $GAMCFGDIR +``` + +### Set a working directory + +You should establish a GAM working directory; you will store your GAM related +data in this folder and execute GAM commands from this folder. You should not use +/Users/admin/bin/gamadv-xtd3 or /Users/admin/GAMConfig for this purpose. +This example assumes that the GAM working directory will be /Users/admin/GAMWork; If you've chosen +another directory, substitute that value in the directions. + +Make the directory: +``` +mkdir -p /Users/admin/GAMWork +``` + +### Set an alias +You should set an alias to point to /Users/admin/bin/gamadv-xtd3/gam so you can operate from the /Users/admin/GAMWork directory. +Aliases aren't available in scripts, so you may want to set a symlink instead, see below. + +Add the following line: +``` +alias gam="/Users/admin/bin/gamadv-xtd3/gam" +``` +to one of these files based on your shell: +``` +~/.bash_aliases +~/.bash_profile +~/.bashrc +~/.zshrc +~/.profile +``` + +If you already have an alias for legacy GAM but are no longer going to run it, delete these lines: +``` +function gam() { "/Users/admin/bin/gam/gam" "$@" ; }" +alias gam="/Users/admin/bin/gam/gam" +``` + +If you already have an alias for legacy GAM and want to run it and GAMADV-XTD3, give your old alias a different name: +``` +function gamstd() { "/Users/admin/bin/gam/gam" "$@" ; }" +alias gamstd="/Users/admin/bin/gam/gam" +``` + +Issue the following command replacing `` with the name of the file you edited: +``` +source +``` + +### Set a symlink +Set a symlink in `/usr/local/bin` (or some other location on $PATH) to point to GAM. +``` +ln -s "/Users/admin/bin/gamadv-xtd3/gam" /usr/local/bin/gam +``` + +Set environment variable OLDGAMPATH to point to the existing Gam directory; /Users/admin/bin/gam will be used in this example. +If your existing Gam is in another directory, substitute that value in the directions. +``` +admin@server:/Users/admin$ export OLDGAMPATH=/Users/admin/bin/gam +``` +Verify that OLDGAMPATH points to the correct location. +``` +admin@server:/Users/admin$ ls -l $OLDGAMPATH/*.json +-rw-r-----@ 1 admin staff 553 Feb 26 10:39 /Users/admin/bin/gam/client_secrets.json +-rw-r-----@ 1 admin staff 2377 Feb 26 10:39 /Users/admin/bin/gam/oauth2service.json +admin@server:/Users/admin$ +``` +### Initialize GAMADV-XTD3; this should be the first GAMADV-XTD3 command executed. +``` +admin@server:/Users/admin$ gam config drive_dir /Users/admin/GAMWork verify +Created: /Users/admin/GAMConfig +Created: /Users/admin/GAMConfig/gamcache +Copied: /Users/admin/bin/gam/oauth2service.json, To: /Users/admin/GAMConfig/oauth2service.json +Copied: /Users/admin/bin/gam/oauth2.txt, To: /Users/admin/GAMConfig/oauth2.txt +Copied: /Users/admin/bin/gam/client_secrets.json, To: /Users/admin/GAMConfig/client_secrets.json +Config File: /Users/admin/GAMConfig/gam.cfg, Initialized +Section: DEFAULT + ... + cache_dir = /Users/admin/GAMConfig/gamcache + ... + config_dir = /Users/admin/GAMConfig + ... + drive_dir = /Users/admin/GAMWork + ... + +admin@server:/Users/admin$ +``` +### Verify initialization, this was a successful installation. +``` +admin@server:/Users/admin$ ls -l $GAMCFGDIR +total 48 +-rw-r-----+ 1 admin staff 553 Mar 3 09:23 client_secrets.json +-rw-r-----+ 1 admin staff 1069 Mar 3 09:23 gam.cfg +drwxr-x---+ 2 admin staff 68 Mar 3 09:23 gamcache +-rw-r-----+ 1 admin staff 10 Mar 3 09:23 lastupdatecheck.txt +-rw-r-----+ 1 admin staff 5104 Mar 3 09:23 oauth2.txt +-rw-rw-rw-+ 1 admin staff 0 Mar 3 09:23 oauth2.txt.lock +-rw-r-----+ 1 admin staff 2377 Mar 3 09:23 oauth2service.json +admin@server:/Users/admin$ +``` +If the verification looks like this, then you'll have to copy client_secrets.json and oauth2service.json manually. +``` +admin@server:/Users/admin$ ls -l $GAMCFGDIR +total 40 +-rw-r-----+ 1 admin admin 1427 Nov 1 11:38 gam.cfg +drwxr-x---+ 16 admin admin 544 Nov 2 07:25 gamcache +-rw-r--r--+ 1 admin admin 10 Nov 2 15:31 lastupdatecheck.txt +-rw-rw-rw-+ 1 admin admin 0 Sep 19 17:28 oauth2.txt.lock + +admin@server:/Users/admin$ cp -p $OLDGAMPATH/client_secrets.json $GAMCFGDIR/ +admin@server:/Users/admin$ cp -p $OLDGAMPATH/oauth2service.json $GAMCFGDIR/ +admin@server:/Users/admin$ cp -p $OLDGAMPATH/oauth2.txt $GAMCFGDIR/ +admin@server:/Users/admin$ ls -l $GAMCFGDIR +total 40 +-rw-r-----+ 1 admin staff 553 Mar 3 09:23 client_secrets.json +-rw-r-----+ 1 admin staff 1069 Mar 3 09:23 gam.cfg +drwxr-x---+ 2 admin staff 68 Mar 3 09:23 gamcache +-rw-r-----+ 1 admin staff 10 Mar 3 09:23 lastupdatecheck.txt +-rw-r-----+ 1 admin staff 5104 Mar 3 09:23 oauth2.txt +-rw-rw-rw-+ 1 admin staff 0 Mar 3 09:23 oauth2.txt.lock +-rw-r-----+ 1 admin staff 2377 Mar 3 09:23 oauth2service.json +``` +### Update your project with local browser to include the additional APIs that GAMADV-XTD3 uses. +``` +admin@server:/Users/admin$ gam update project + +Enter your Google Workspace admin or GCP project manager email address authorized to manage project(s) gam-project-abc-123-xyz? admin@domain.com + +Your browser has been opened to visit: + + https://accounts.google.com/o/oauth2/v2/auth?redirect_uri=http%3A%2F%2Flocalhost%3A8080%2F&response_type=code&client_id=... + +If your browser is on a different machine then press CTRL+C, +set no_browser = true in gam.cfg and re-run this command. + +Authentication successful. +API: admin.googleapis.com, already enabled... +API: appsactivity.googleapis.com, already enabled... +API: calendar-json.googleapis.com, already enabled... +API: classroom.googleapis.com, already enabled... +API: contacts.googleapis.com, already enabled... +API: drive.googleapis.com, already enabled... +API: gmail.googleapis.com, already enabled... +API: groupssettings.googleapis.com, already enabled... +API: licensing.googleapis.com, already enabled... +API: plus.googleapis.com, already enabled... +API: reseller.googleapis.com, already enabled... +API: siteverification.googleapis.com, already enabled... +API: vault.googleapis.com, already enabled... +Enable 3 APIs + API: audit.googleapis.com, Enabled (1/3) + API: groupsmigration.googleapis.com, Enabled (2/3) + API: sheets.googleapis.com, Enabled (3/3) + +admin@server:/Users/admin$ +``` +### Update your project without local browser (Google Cloud Shell for instance) to include the additional APIs that GAMADV-XTD3 uses +``` +admin@server:/Users/admin$ gam config no_browser true save +admin@server:/Users/admin$ gam update project + +Enter your Google Workspace admin or GCP project manager email address authorized to manage project(s) gam-project-abc-123-xyz? admin@domain.com + +Go to the following link in a browser on other computer: + + https://accounts.google.com/o/oauth2/v2/auth?redirect_uri=http%3A%2F%2Flocalhost%3A8080%2F&response_type=code&client_id=... + +Enter verification code: abc...xyz + +Authentication successful. +API: admin.googleapis.com, already enabled... +API: appsactivity.googleapis.com, already enabled... +API: calendar-json.googleapis.com, already enabled... +API: classroom.googleapis.com, already enabled... +API: contacts.googleapis.com, already enabled... +API: drive.googleapis.com, already enabled... +API: gmail.googleapis.com, already enabled... +API: groupssettings.googleapis.com, already enabled... +API: licensing.googleapis.com, already enabled... +API: plus.googleapis.com, already enabled... +API: reseller.googleapis.com, already enabled... +API: siteverification.googleapis.com, already enabled... +API: vault.googleapis.com, already enabled... +Enable 3 APIs + API: audit.googleapis.com, Enabled (1/3) + API: groupsmigration.googleapis.com, Enabled (2/3) + API: sheets.googleapis.com, Enabled (3/3) + +admin@server:/Users/admin$ +``` +### Enable GAMADV-XTD3 client access + +Create oauth2.txt; it must be deleted and recreated because it is in a different format than in basic Gam. + +You select a list of scopes, GAM uses a browser to get final authorization from Google for these scopes and +writes the credentials into the file oauth2.txt. + +``` +admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt +admin@server:/Users/admin$ gam version +WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found +GAMADV-XTD3 7.00.04 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +Ross Scroggs +Python 3.12.6 64-bit final +MacOS Sonoma 14.5 x86_64 +Path: /Users/admin/bin/gamadv-xtd3 +Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com + +admin@server:/Users/admin$ gam oauth create + +[*] 0) Calendar API (supports readonly) +[*] 1) Chrome Browser Cloud Management API (supports readonly) +[*] 2) Chrome Management API - AppDetails read only +[*] 3) Chrome Management API - Telemetry read only +[*] 4) Chrome Management API - read only +[*] 5) Chrome Policy API (supports readonly) +[*] 6) Chrome Printer Management API (supports readonly) +[*] 7) Chrome Version History API +[*] 8) Classroom API - Course Announcements (supports readonly) +[*] 9) Classroom API - Course Topics (supports readonly) +[*] 10) Classroom API - Course Work/Materials (supports readonly) +[*] 11) Classroom API - Course Work/Submissions (supports readonly) +[*] 12) Classroom API - Courses (supports readonly) +[*] 13) Classroom API - Profile Emails +[*] 14) Classroom API - Profile Photos +[*] 15) Classroom API - Rosters (supports readonly) +[*] 16) Classroom API - Student Guardians (supports readonly) +[ ] 17) Cloud Channel API (supports readonly) +[*] 18) Cloud Identity - Inbound SSO Settings (supports readonly) +[*] 19) Cloud Identity Groups API (supports readonly) +[*] 20) Cloud Identity OrgUnits API (supports readonly) +[*] 21) Cloud Identity User Invitations API (supports readonly) +[ ] 22) Cloud Storage API (Read Only, Vault/Takeout Download, Cloud Storage) +[ ] 23) Cloud Storage API (Read/Write, Vault/Takeout Copy/Download, Cloud Storage) +[*] 24) Contact Delegation API (supports readonly) +[*] 25) Contacts API - Domain Shared Contacts and GAL +[*] 26) Data Transfer API (supports readonly) +[*] 27) Directory API - Chrome OS Devices (supports readonly) +[*] 28) Directory API - Customers (supports readonly) +[*] 29) Directory API - Domains (supports readonly) +[*] 30) Directory API - Groups (supports readonly) +[*] 31) Directory API - Mobile Devices Directory (supports readonly and action) +[*] 32) Directory API - Organizational Units (supports readonly) +[*] 33) Directory API - Resource Calendars (supports readonly) +[*] 34) Directory API - Roles (supports readonly) +[*] 35) Directory API - User Schemas (supports readonly) +[*] 36) Directory API - User Security +[*] 37) Directory API - Users (supports readonly) +[ ] 38) Email Audit API +[*] 39) Groups Migration API +[*] 40) Groups Settings API +[*] 41) License Manager API +[*] 42) People API (supports readonly) +[*] 43) People Directory API - read only +[ ] 44) Pub / Sub API +[*] 45) Reports API - Audit Reports +[*] 46) Reports API - Usage Reports +[ ] 47) Reseller API +[*] 48) Site Verification API +[ ] 49) Sites API +[*] 50) Vault API (supports readonly) + +Select an unselected scope [ ] by entering a number; yields [*] +For scopes that support readonly, enter a number and an 'r' to grant read-only access; yields [R] +For scopes that support action, enter a number and an 'a' to grant action-only access; yields [A] +Clear read-only access [R] or action-only access [A] from a scope by entering a number; yields [*] +Unselect a selected scope [*] by entering a number; yields [ ] +Select all default scopes by entering an 's'; yields [*] for default scopes, [ ] for others +Unselect all scopes by entering a 'u'; yields [ ] for all scopes +Exit without changes/authorization by entering an 'e' +Continue to authorization by entering a 'c' + Note, if all scopes are selected, Google will probably generate an authorization error + +Please enter 0-50[a|r] or s|u|e|c: c + +Enter your Google Workspace admin email address? admin@domain.com + +Go to the following link in a browser on this computer or on another computer: + + https://accounts.google.com/o/oauth2/v2/auth?response_type=code&client_id=423565144751-10lsdt2lgnsch9jmdhl35uq4617u1ifp&redirect_uri=http%3A%2F%2F127.0.0.1%3A8080%2F&scope=... + +If you use a browser on another computer, you will get a browser error that the site can't be reached AFTER you +click the Allow button, paste "Unable to connect" URL from other computer (only URL data up to &scope required): + +Enter verification code or paste "Unable to connect" URL from other computer (only URL data up to &scope required): + +The authentication flow has completed. +Client OAuth2 File: /Users/admin/GAMConfig/oauth2.txt, Created + +admin@server:/Users/admin$ +``` +### Enable GAMADV-XTD3 service account access. +``` +admin@server:/Users/admin$ gam user admin@domain.com check serviceaccount +$ gam user admin@domain.com check serviceaccount +System time status + Your system time differs from www.googleapis.com by less than 1 second PASS +Service Account Private Key Authentication + Authentication PASS +Service Account Private Key age; Google recommends rotating keys on a routine basis + Service Account Private Key age: 0 days PASS +Domain-wide Delegation authentication:, User: admin@domain.com, Scopes: 34 + https://mail.google.com/ PASS (1/34) + https://sites.google.com/feeds PASS (2/34) + https://www.googleapis.com/auth/analytics.readonly PASS (3/34) + https://www.googleapis.com/auth/apps.alerts PASS (4/34) + https://www.googleapis.com/auth/calendar PASS (5/34) + https://www.googleapis.com/auth/chat.delete PASS (6/34) + https://www.googleapis.com/auth/chat.memberships PASS (7/34) + https://www.googleapis.com/auth/chat.messages PASS (8/34) + https://www.googleapis.com/auth/chat.spaces PASS (9/34) + https://www.googleapis.com/auth/classroom.announcements PASS (10/34) + https://www.googleapis.com/auth/classroom.coursework.students PASS (11/34) + https://www.googleapis.com/auth/classroom.courseworkmaterials PASS (12/34) + https://www.googleapis.com/auth/classroom.profile.emails PASS (13/34) + https://www.googleapis.com/auth/classroom.rosters PASS (14/34) + https://www.googleapis.com/auth/classroom.topics PASS (15/34) + https://www.googleapis.com/auth/cloud-identity PASS (16/34) + https://www.googleapis.com/auth/cloud-platform PASS (17/34) + https://www.googleapis.com/auth/contacts PASS (18/34) + https://www.googleapis.com/auth/contacts.other.readonly PASS (19/34) + https://www.googleapis.com/auth/datastudio PASS (20/34) + https://www.googleapis.com/auth/directory.readonly PASS (21/34) + https://www.googleapis.com/auth/documents PASS (22/34) + https://www.googleapis.com/auth/drive PASS (23/34) + https://www.googleapis.com/auth/drive.activity PASS (24/34) + https://www.googleapis.com/auth/drive.admin.labels FAIL (25/34) + https://www.googleapis.com/auth/drive.labels FAIL (26/34) + https://www.googleapis.com/auth/gmail.modify PASS (27/34) + https://www.googleapis.com/auth/gmail.settings.basic PASS (28/34) + https://www.googleapis.com/auth/gmail.settings.sharing PASS (29/34) + https://www.googleapis.com/auth/keep PASS (30/34) + https://www.googleapis.com/auth/spreadsheets PASS (31/34) + https://www.googleapis.com/auth/tasks PASS (32/34) + https://www.googleapis.com/auth/userinfo.profile PASS (33/34) + https://www.googleapis.com/auth/youtube.readonly PASS (34/34) +Some scopes FAILED! +To authorize them, please go to: + + https://admin.google.com/ac/owl/domainwidedelegation?clientScopeToAdd=https://mail.google.com/,https://sites.google.com/feeds,https://www.googleapis.com/auth/apps.alerts,https://www.googleapis.com/auth/calendar,https://www.googleapis.com/auth/classroom.announcements,https://www.googleapis.com/auth/classroom.coursework.students,https://www.googleapis.com/auth/classroom.courseworkmaterials,https://www.googleapis.com/auth/classroom.profile.emails,https://www.googleapis.com/auth/classroom.rosters,https://www.googleapis.com/auth/classroom.topics,https://www.googleapis.com/auth/cloud-identity,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/contacts,https://www.googleapis.com/auth/contacts.other.readonly,https://www.googleapis.com/auth/datastudio,https://www.googleapis.com/auth/directory.readonly,https://www.googleapis.com/auth/documents,https://www.googleapis.com/auth/drive,https://www.googleapis.com/auth/drive.activity,https://www.googleapis.com/auth/gmail.modify,https://www.googleapis.com/auth/gmail.settings.basic,https://www.googleapis.com/auth/gmail.settings.sharing,https://www.googleapis.com/auth/keep,https://www.googleapis.com/auth/spreadsheets,https://www.googleapis.com/auth/tasks,https://www.googleapis.com/auth/userinfo.profile,https://www.googleapis.com/auth/userinfo.email&clientIdToAdd=SVCACCTID&overwriteClientId=true&dn=domain.com&authuser=admin@domain.com + +You will be directed to the Google Workspace admin console Security/API Controls/Domain-wide Delegation page +The "Add a new Client ID" box will open +Make sure that "Overwrite existing client ID" is checked +Click AUTHORIZE +When the box closes you're done +After authorizing it may take some time for this test to pass so wait a few moments and then try this command again. + +admin@server:/Users/admin$ +``` +The link shown in the error message should take you directly to the authorization screen. +If not, make sure that you are logged in as a domain admin, then re-enter the link. + +### Verify GAMADV-XTD3 service account access. + +Wait a moment and then perform the following command; it it still fails, wait a bit longer, it can sometimes take serveral minutes +for the authorization to complete. +``` +admin@server:/Users/admin$ gam user admin@domain.com check serviceaccount +System time status: + Your system time differs from www.googleapis.com by less than 1 second PASS +Service Account Private Key Authentication: + Authentication PASS +Domain-wide Delegation authentication:, User: admin@domain.com, Scopes: 34 + https://mail.google.com/ PASS (1/34) + https://sites.google.com/feeds PASS (2/34) + https://www.googleapis.com/auth/analytics.readonly PASS (3/34) + https://www.googleapis.com/auth/apps.alerts PASS (4/34) + https://www.googleapis.com/auth/calendar PASS (5/34) + https://www.googleapis.com/auth/chat.delete PASS (6/34) + https://www.googleapis.com/auth/chat.memberships PASS (7/34) + https://www.googleapis.com/auth/chat.messages PASS (8/34) + https://www.googleapis.com/auth/chat.spaces PASS (9/34) + https://www.googleapis.com/auth/classroom.announcements PASS (10/34) + https://www.googleapis.com/auth/classroom.coursework.students PASS (11/34) + https://www.googleapis.com/auth/classroom.courseworkmaterials PASS (12/34) + https://www.googleapis.com/auth/classroom.profile.emails PASS (13/34) + https://www.googleapis.com/auth/classroom.rosters PASS (14/34) + https://www.googleapis.com/auth/classroom.topics PASS (15/34) + https://www.googleapis.com/auth/cloud-identity PASS (16/34) + https://www.googleapis.com/auth/cloud-platform PASS (17/34) + https://www.googleapis.com/auth/contacts PASS (18/34) + https://www.googleapis.com/auth/contacts.other.readonly PASS (19/34) + https://www.googleapis.com/auth/datastudio PASS (20/34) + https://www.googleapis.com/auth/directory.readonly PASS (21/34) + https://www.googleapis.com/auth/documents PASS (22/34) + https://www.googleapis.com/auth/drive PASS (23/34) + https://www.googleapis.com/auth/drive.activity PASS (24/34) + https://www.googleapis.com/auth/drive.admin.labels PASS (25/34) + https://www.googleapis.com/auth/drive.labels PASS (26/34) + https://www.googleapis.com/auth/gmail.modify PASS (27/34) + https://www.googleapis.com/auth/gmail.settings.basic PASS (28/34) + https://www.googleapis.com/auth/gmail.settings.sharing PASS (29/34) + https://www.googleapis.com/auth/keep PASS (30/34) + https://www.googleapis.com/auth/spreadsheets PASS (31/34) + https://www.googleapis.com/auth/tasks PASS (32/34) + https://www.googleapis.com/auth/userinfo.profile PASS (33/34) + https://www.googleapis.com/auth/youtube.readonly PASS (34/34) +All scopes PASSED! + +Service Account Client name: SVCACCTID is fully authorized. + +admin@server:/Users/admin$ +``` +### Update gam.cfg with some basic values +* `customer_id` - Having this data keeps Gam from having to make extra API calls +* `domain` - This allows you to omit the domain portion of email addresses +* `timezone local` - Gam will convert all UTC times to your local timezone +``` +admin@server:/Users/admin$ gam info domain +Customer ID: C01234567 +Primary Domain: domain.com +Customer Creation Time: 2007-06-06T15:47:55.444Z +Primary Domain Verified: True +Default Language: en +... + +admin@server:/Users/admin$ gam config customer_id C01234567 domain domain.com timezone local save verify +Config File: /Users/admin/GAMConfig/gam.cfg, Saved +Section: DEFAULT + activity_max_results = 100 + admin_email = '' + api_calls_rate_check = false + api_calls_rate_limit = 100 + api_calls_tries_limit = 10 + auto_batch_min = 0 + bail_on_internal_error_tries = 2 + batch_size = 50 + cacerts_pem = '' + cache_dir = /Users/admin/GAMConfig/gamcache + cache_discovery_only = true + channel_customer_id = '' + charset = utf-8 + classroom_max_results = 0 + client_secrets_json = client_secrets.json ; /Users/admin/GAMConfig/client_secrets.json + clock_skew_in_seconds = 10 + cmdlog = '' + cmdlog_max_backups = 5 + cmdlog_max_kilo_bytes = 1000 + config_dir = /Users/admin/GAMConfig + contact_max_results = 100 + csv_input_column_delimiter = , + csv_input_quote_char = '"' + csv_input_row_drop_filter = '' + csv_input_row_drop_filter_mode = anymatch + csv_input_row_filter = '' + csv_input_row_filter_mode = allmatch + csv_input_row_limit = 0 + csv_output_column_delimiter = , + csv_output_convert_cr_nl = false + csv_output_field_delimiter = ' ' + csv_output_header_drop_filter = '' + csv_output_header_filter = '' + csv_output_header_force = '' + csv_output_line_terminator = lf + csv_output_quote_char = '"' + csv_output_row_drop_filter = '' + csv_output_row_drop_filter_mode = anymatch + csv_output_row_filter = '' + csv_output_row_filter_mode = allmatch + csv_output_row_limit = 0 + csv_output_subfield_delimiter = '.' + csv_output_timestamp_column = '' + csv_output_users_audit = false + customer_id = C01234567 + debug_level = 0 + device_max_results = 200 + domain = domain.com + drive_dir = /Users/admin/GAMWork + drive_max_results = 1000 + drive_v3_native_names = true + email_batch_size = 50 + event_max_results = 250 + extra_args = '' + inter_batch_wait = 0 + license_max_results = 100 + license_skus = '' + member_max_results = 200 + message_batch_size = 50 + message_max_results = 500 + never_time = Never + no_browser = false + no_cache = false + no_update_check = true + no_verify_ssl = false + num_tbatch_threads = 2 + num_threads = 5 + oauth2_txt = oauth2.txt ; /Users/admin/GAMConfig/oauth2.txt + oauth2service_json = oauth2service.json ; /Users/admin/GAMConfig/oauth2service.json + people_max_results = 100 + print_agu_domains = '' + print_cros_ous = '' + print_cros_ous_and_children = '' + process_wait_limit = 0 + quick_cros_move = false + quick_info_user = False + reseller_id = '' + retry_api_service_not_available = false + section = '' + show_api_calls_retry_data = false + show_commands = false + show_convert_cr_nl = false + show_counts_min = 1 + show_gettings = true + show_gettings_got_nl = false + show_multiprocess_info = false + smtp_fqdn = '' + smtp_host = '' + smtp_password = '' + smtp_username = '' + timezone = local + tls_max_version = '' + tls_min_version = 'TLSv1_2' + todrive_clearfilter = false + todrive_clientaccess = false + todrive_conversion = true + todrive_localcopy = false + todrive_locale = '' + todrive_nobrowser = false + todrive_noemail = true + todrive_parent = root + todrive_sheet_timeformat = '' + todrive_sheet_timestamp = false + todrive_timeformat = '' + todrive_timestamp = false + todrive_timezone = '' + todrive_upload_nodata = true + todrive_user = '' + truncate_client_id = false + update_cros_ou_with_id = false + use_projectid_as_name = false + user_max_results = 500 + user_service_account_access_only = false + +admin@server:/Users/admin$ +``` + +## Windows + +In these examples, your Google Super admin is shown as admin@domain.com; replace with the +actual email adddress. + +This example assumes that GAMADV-XTD3 has been installed in C:\GAMADV-XTD3; if you've installed +GAMADV-XTD3 in another directory, substitute that value in the directions. + +These steps assume Command Prompt, adjust if you're using PowerShell. + +### Set a configuration directory + +The default GAM configuration directory is C:\Users\\.gam; for more flexibility you +probably want to select a non user-specific location. This example assumes that the GAM +configuration directory will be C:\GAMConfig; If you've chosen another directory, +substitute that value in the directions. +* Make the C:\GAMConfig directory before proceeding. + +### Set a working directory + +You should extablish a GAM working directory; you will store your GAM related +data in this folder and execute GAM commands from this folder. You should not use +C:\GAMADV-XTD3 or C:\GAMConfig for this purpose. +This example assumes that the GAM working directory will be C:\GAMWork; If you've chosen +another directory, substitute that value in the directions. +* Make the C:\GAMWork directory before proceeding. + +### Set system path and GAM configuration directory +You should set the system path to point to C:\GAMADV-XTD3 so you can operate from the C:\GAMWork directory. +``` +Start Control Panel +Click System +Click Advanced system settings +Click Environment Variables... +Click Path under System variables +Click Edit... +If you have an existing entry referencing legacy GAM: + Click that entry + Click Delete +If C:\GAMADV-XTD3 is already on the Path, skip the next three steps + Click New + Enter C:\GAMADV-XTD3 + Click OK +Click New +Set Variable name: GAMCFGDIR +Set Variable value: C:\GAMConfig +Click OK +Click OK +Click OK +Exit Control Panel +``` + +At this point, you should restart Command Prompt so that it has the updated path and environment variables. + +Set environment variable OLDGAMPATH to point to the existing Gam directory; C:\GAM will be used in this example. +If your existing Gam is in another directory, substitute that value in the directions. +``` +C:\>set OLDGAMPATH=C:\GAM +``` +### Verify that OLDGAMPATH points to the correct location. +``` +C:\>dir %OLDGAMPATH%\*.json + Volume in drive C has no label. + Volume Serial Number is 663F-DA8B + + Directory of C:\GAM + +02/26/2017 10:39 AM 553 client_secrets.json +02/12/2017 09:22 AM 10,133 cloudprint-v2.json +02/12/2017 09:22 AM 3,448 email-settings-v2.json +02/26/2017 10:39 AM 2,377 oauth2service.json + 4 File(s) 16,511 bytes + 0 Dir(s) 434,214,162,432 bytes free +``` +### Initialize GAMADV-XTD3; this should be the first GAMADV-XTD3 command executed. +``` +C:\>gam config drive_dir C:\GAMWork verify +Created: C:\GAMConfig +Created: C:\GAMConfig\gamcache +Copied: C:\GAM\oauth2service.json, To: C:\GAMConfig\oauth2service.json +Copied: C:\GAM\oauth2.txt, To: C:\GAMConfig\oauth2.txt +Copied: C:\GAM\client_secrets.json, To: C:\GAMConfig\client_secrets.json +Config File: C:\GAMConfig\gam.cfg, Initialized +Section: DEFAULT + activity_max_results = 100 + admin_email = '' + api_calls_rate_check = false + api_calls_rate_limit = 100 + api_calls_tries_limit = 10 + auto_batch_min = 0 + bail_on_internal_error_tries = 2 + batch_size = 50 + cacerts_pem = '' + cache_dir = C:\GAMConfig\gamcache + cache_discovery_only = true + channel_customer_id = '' + charset = utf-8 + classroom_max_results = 0 + client_secrets_json = client_secrets.json ; C:\GAMConfig\client_secrets.json + clock_skew_in_seconds = 10 + cmdlog = '' + cmdlog_max_backups = 5 + cmdlog_max_kilo_bytes = 1000 + config_dir = C:\GAMConfig + contact_max_results = 100 + csv_input_column_delimiter = , + csv_input_quote_char = '"' + csv_input_row_drop_filter = '' + csv_input_row_drop_filter_mode = anymatch + csv_input_row_filter = '' + csv_input_row_filter_mode = allmatch + csv_input_row_limit = 0 + csv_output_column_delimiter = , + csv_output_convert_cr_nl = false + csv_output_field_delimiter = ' ' + csv_output_header_drop_filter = '' + csv_output_header_filter = '' + csv_output_header_force = '' + csv_output_line_terminator = lf + csv_output_quote_char = '"' + csv_output_row_drop_filter = '' + csv_output_row_drop_filter_mode = anymatch + csv_output_row_filter = '' + csv_output_row_filter_mode = allmatch + csv_output_row_limit = 0 + csv_output_subfield_delimiter = '.' + csv_output_timestamp_column = '' + csv_output_users_audit = false + customer_id = my_customer + debug_level = 0 + device_max_results = 200 + domain = '' + drive_dir = C:\GAMWork + drive_max_results = 1000 + drive_v3_native_names = true + email_batch_size = 50 + event_max_results = 250 + extra_args = '' + inter_batch_wait = 0 + license_max_results = 100 + license_skus = '' + member_max_results = 200 + message_batch_size = 50 + message_max_results = 500 + never_time = Never + no_browser = false + no_cache = false + no_update_check = true + no_verify_ssl = false + num_tbatch_threads = 2 + num_threads = 5 + oauth2_txt = oauth2.txt ; C:\GAMConfig\oauth2.txt + oauth2service_json = oauth2service.json ; C:\GAMConfig\oauth2service.json + people_max_results = 100 + print_agu_domains = '' + print_cros_ous = '' + print_cros_ous_and_children = '' + process_wait_limit = 0 + quick_cros_move = false + quick_info_user = False + reseller_id = '' + retry_api_service_not_available = false + section = '' + show_api_calls_retry_data = false + show_commands = false + show_convert_cr_nl = false + show_counts_min = 1 + show_gettings = true + show_gettings_got_nl = false + show_multiprocess_info = false + smtp_fqdn = '' + smtp_host = '' + smtp_password = '' + smtp_username = '' + timezone = utc + tls_max_version = '' + tls_min_version = 'TLSv1_2' + todrive_clearfilter = false + todrive_clientaccess = false + todrive_conversion = true + todrive_localcopy = false + todrive_locale = '' + todrive_nobrowser = false + todrive_noemail = true + todrive_parent = root + todrive_sheet_timeformat = '' + todrive_sheet_timestamp = false + todrive_timeformat = '' + todrive_timestamp = false + todrive_timezone = '' + todrive_upload_nodata = true + todrive_user = '' + truncate_client_id = false + update_cros_ou_with_id = false + use_projectid_as_name = false + user_max_results = 500 + user_service_account_access_only = false + +C:\> +``` +### Verify initialization, this was a successful installation. +``` +C:\>dir %GAMCFGDIR% + Volume in drive C has no label. + Volume Serial Number is 663F-DA8B + + Directory of C:\GAMConfig + +03/03/2017 10:16 AM . +03/03/2017 10:16 AM .. +03/03/2017 10:15 AM 553 client_secrets.json +03/03/2017 10:15 AM 1,125 gam.cfg +03/03/2017 10:15 AM gamcache +03/03/2017 10:16 AM 10 lastupdatecheck.txt +03/03/2017 10:15 AM 11,704 oauth2.txt +03/03/2017 10:15 AM 0 oauth2.txt.lock +03/03/2017 10:15 AM 2,377 oauth2service.json + 6 File(s) 15,769 bytes + 3 Dir(s) 110,532,562,944 bytes free +C:\> +``` +If the verification looks like this, then you'll have to copy client_secrets.json and oauth2service.json manually. +``` +C:\>dir %GAMCFGDIR% + Volume in drive C has no label. + Volume Serial Number is 663F-DA8B + + Directory of C:\GAMConfig + +03/03/2017 10:19 AM . +03/03/2017 10:19 AM .. +03/03/2017 10:15 AM 1,125 gam.cfg +03/03/2017 10:15 AM gamcache +03/03/2017 10:16 AM 10 lastupdatecheck.txt +03/03/2017 10:15 AM 0 oauth2.txt.lock + 3 File(s) 1,135 bytes + 3 Dir(s) 110,532,562,944 bytes free + +C:\>copy %OLDGAMPATH%\client_secrets.json %GAMCFGDIR% + 1 file(s) copied. + +C:\>copy %OLDGAMPATH%\oauth2service.json %GAMCFGDIR% + 1 file(s) copied. + +C:\>dir %GAMCFGDIR% + Volume in drive C has no label. + Volume Serial Number is 663F-DA8B + + Directory of C:\GAMConfig + +03/03/2017 10:20 AM . +03/03/2017 10:20 AM .. +02/26/2017 10:39 AM 553 client_secrets.json +03/03/2017 10:15 AM 1,125 gam.cfg +03/03/2017 10:15 AM gamcache +03/03/2017 10:16 AM 10 lastupdatecheck.txt +03/03/2017 10:15 AM 0 oauth2.txt.lock +02/26/2017 10:39 AM 2,377 oauth2service.json + 5 File(s) 4,065 bytes + 3 Dir(s) 110,532,538,368 bytes free +``` +### Update your project with local browser to include the additional APIs that GAMADV-XTD3 uses. +``` +C:\>gam update project + +Enter your Google Workspace admin or GCP project manager email address authorized to manage project(s) gam-project-abc-123-xyz? admin@domain.com + +Your browser has been opened to visit: + + https://accounts.google.com/o/oauth2/v2/auth?redirect_uri=http%3A%2F%2Flocalhost%3A8080%2F&response_type=code&client_id=... + +Authentication successful. +API: admin.googleapis.com, already enabled... +API: appsactivity.googleapis.com, already enabled... +API: calendar-json.googleapis.com, already enabled... +API: classroom.googleapis.com, already enabled... +API: contacts.googleapis.com, already enabled... +API: drive.googleapis.com, already enabled... +API: gmail.googleapis.com, already enabled... +API: groupssettings.googleapis.com, already enabled... +API: licensing.googleapis.com, already enabled... +API: plus.googleapis.com, already enabled... +API: reseller.googleapis.com, already enabled... +API: siteverification.googleapis.com, already enabled... +API: vault.googleapis.com, already enabled... +Enable 3 APIs + API: audit.googleapis.com, Enabled (1/3) + API: groupsmigration.googleapis.com, Enabled (2/3) + API: sheets.googleapis.com, Enabled (3/3) + +C:\> +``` +### Update your project without local browser (headless server for instance) to include the additional APIs that GAMADV-XTD3 uses +``` +C:\>gam config no_browser true save +C:\>gam update project + +Enter your Google Workspace admin or GCP project manager email address authorized to manage project(s) gam-project-abc-123-xyz? admin@domain.com + +Go to the following link in a browser on other computer: + + https://accounts.google.com/o/oauth2/v2/auth?redirect_uri=http%3A%2F%2Flocalhost%3A8080%2F&response_type=code&client_id=... + +Enter verification code: abc...xyz + +Authentication successful. +API: admin.googleapis.com, already enabled... +API: appsactivity.googleapis.com, already enabled... +API: calendar-json.googleapis.com, already enabled... +API: classroom.googleapis.com, already enabled... +API: contacts.googleapis.com, already enabled... +API: drive.googleapis.com, already enabled... +API: gmail.googleapis.com, already enabled... +API: groupssettings.googleapis.com, already enabled... +API: licensing.googleapis.com, already enabled... +API: plus.googleapis.com, already enabled... +API: reseller.googleapis.com, already enabled... +API: siteverification.googleapis.com, already enabled... +API: vault.googleapis.com, already enabled... +Enable 3 APIs + API: audit.googleapis.com, Enabled (1/3) + API: groupsmigration.googleapis.com, Enabled (2/3) + API: sheets.googleapis.com, Enabled (3/3) + +C:\> +``` +### Enable GAMADV-XTD3 client access + +Create oauth2.txt; it must be deleted and recreated because it is in a different format than in basic Gam. + +You select a list of scopes, GAM uses a browser to get final authorization from Google for these scopes and +writes the credentials into the file oauth2.txt. +``` +C:\>del C:\GAMConfig\oauth2.txt +C:\>gam version +WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found +GAMADV-XTD3 7.00.04 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +Ross Scroggs +Python 3.12.6 64-bit final +Windows-10-10.0.17134 AMD64 +Path: C:\GAMADV-XTD3 +Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com + +C:\>gam oauth create + +[*] 0) Calendar API (supports readonly) +[*] 1) Chrome Browser Cloud Management API (supports readonly) +[*] 2) Chrome Management API - AppDetails read only +[*] 3) Chrome Management API - Telemetry read only +[*] 4) Chrome Management API - read only +[*] 5) Chrome Policy API (supports readonly) +[*] 6) Chrome Printer Management API (supports readonly) +[*] 7) Chrome Version History API +[*] 8) Classroom API - Course Announcements (supports readonly) +[*] 9) Classroom API - Course Topics (supports readonly) +[*] 10) Classroom API - Course Work/Materials (supports readonly) +[*] 11) Classroom API - Course Work/Submissions (supports readonly) +[*] 12) Classroom API - Courses (supports readonly) +[*] 13) Classroom API - Profile Emails +[*] 14) Classroom API - Profile Photos +[*] 15) Classroom API - Rosters (supports readonly) +[*] 16) Classroom API - Student Guardians (supports readonly) +[ ] 17) Cloud Channel API (supports readonly) +[*] 18) Cloud Identity - Inbound SSO Settings (supports readonly) +[*] 19) Cloud Identity Groups API (supports readonly) +[*] 20) Cloud Identity OrgUnits API (supports readonly) +[*] 21) Cloud Identity User Invitations API (supports readonly) +[ ] 22) Cloud Storage API (Read Only, Vault/Takeout Download, Cloud Storage) +[ ] 23) Cloud Storage API (Read/Write, Vault/Takeout Copy/Download, Cloud Storage) +[*] 24) Contact Delegation API (supports readonly) +[*] 25) Contacts API - Domain Shared Contacts and GAL +[*] 26) Data Transfer API (supports readonly) +[*] 27) Directory API - Chrome OS Devices (supports readonly) +[*] 28) Directory API - Customers (supports readonly) +[*] 29) Directory API - Domains (supports readonly) +[*] 30) Directory API - Groups (supports readonly) +[*] 31) Directory API - Mobile Devices Directory (supports readonly and action) +[*] 32) Directory API - Organizational Units (supports readonly) +[*] 33) Directory API - Resource Calendars (supports readonly) +[*] 34) Directory API - Roles (supports readonly) +[*] 35) Directory API - User Schemas (supports readonly) +[*] 36) Directory API - User Security +[*] 37) Directory API - Users (supports readonly) +[ ] 38) Email Audit API +[*] 39) Groups Migration API +[*] 40) Groups Settings API +[*] 41) License Manager API +[*] 42) People API (supports readonly) +[*] 43) People Directory API - read only +[ ] 44) Pub / Sub API +[*] 45) Reports API - Audit Reports +[*] 46) Reports API - Usage Reports +[ ] 47) Reseller API +[*] 48) Site Verification API +[ ] 49) Sites API +[*] 50) Vault API (supports readonly) + +Select an unselected scope [ ] by entering a number; yields [*] +For scopes that support readonly, enter a number and an 'r' to grant read-only access; yields [R] +For scopes that support action, enter a number and an 'a' to grant action-only access; yields [A] +Clear read-only access [R] or action-only access [A] from a scope by entering a number; yields [*] +Unselect a selected scope [*] by entering a number; yields [ ] +Select all default scopes by entering an 's'; yields [*] for default scopes, [ ] for others +Unselect all scopes by entering a 'u'; yields [ ] for all scopes +Exit without changes/authorization by entering an 'e' +Continue to authorization by entering a 'c' + Note, if all scopes are selected, Google will probably generate an authorization error + +Please enter 0-50[a|r] or s|u|e|c: c + +Enter your Google Workspace admin email address? admin@domain.com + +Go to the following link in a browser on this computer or on another computer: + + https://accounts.google.com/o/oauth2/v2/auth?response_type=code&client_id=423565144751-10lsdt2lgnsch9jmdhl35uq4617u1ifp&redirect_uri=http%3A%2F%2F127.0.0.1%3A8080%2F&scope=... + +If you use a browser on another computer, you will get a browser error that the site can't be reached AFTER you +click the Allow button, paste "Unable to connect" URL from other computer (only URL data up to &scope required): + +Enter verification code or paste "Unable to connect" URL from other computer (only URL data up to &scope required): + +The authentication flow has completed. +Client OAuth2 File: C:\GAMConfig\oauth2.txt, Created + +C:\> +``` + +### Enable GAMADV-XTD3 service account access. +``` +C:\>gam user admin@domain.com check serviceaccount +System time status + Your system time differs from www.googleapis.com by less than 1 second PASS +Service Account Private Key Authentication + Authentication PASS +Service Account Private Key age; Google recommends rotating keys on a routine basis + Service Account Private Key age: 0 days PASS +Domain-wide Delegation authentication:, User: admin@domain.com, Scopes: 34 + https://mail.google.com/ PASS (1/34) + https://sites.google.com/feeds PASS (2/34) + https://www.googleapis.com/auth/analytics.readonly PASS (3/34) + https://www.googleapis.com/auth/apps.alerts PASS (4/34) + https://www.googleapis.com/auth/calendar PASS (5/34) + https://www.googleapis.com/auth/chat.delete PASS (6/34) + https://www.googleapis.com/auth/chat.memberships PASS (7/34) + https://www.googleapis.com/auth/chat.messages PASS (8/34) + https://www.googleapis.com/auth/chat.spaces PASS (9/34) + https://www.googleapis.com/auth/classroom.announcements PASS (10/34) + https://www.googleapis.com/auth/classroom.coursework.students PASS (11/34) + https://www.googleapis.com/auth/classroom.courseworkmaterials PASS (12/34) + https://www.googleapis.com/auth/classroom.profile.emails PASS (13/34) + https://www.googleapis.com/auth/classroom.rosters PASS (14/34) + https://www.googleapis.com/auth/classroom.topics PASS (15/34) + https://www.googleapis.com/auth/cloud-identity PASS (16/34) + https://www.googleapis.com/auth/cloud-platform PASS (17/34) + https://www.googleapis.com/auth/contacts PASS (18/34) + https://www.googleapis.com/auth/contacts.other.readonly PASS (19/34) + https://www.googleapis.com/auth/datastudio PASS (20/34) + https://www.googleapis.com/auth/directory.readonly PASS (21/34) + https://www.googleapis.com/auth/documents PASS (22/34) + https://www.googleapis.com/auth/drive PASS (23/34) + https://www.googleapis.com/auth/drive.activity PASS (24/34) + https://www.googleapis.com/auth/drive.admin.labels FAIL (25/34) + https://www.googleapis.com/auth/drive.labels FAIL (26/34) + https://www.googleapis.com/auth/gmail.modify PASS (27/34) + https://www.googleapis.com/auth/gmail.settings.basic PASS (28/34) + https://www.googleapis.com/auth/gmail.settings.sharing PASS (29/34) + https://www.googleapis.com/auth/keep PASS (30/34) + https://www.googleapis.com/auth/spreadsheets PASS (31/34) + https://www.googleapis.com/auth/tasks PASS (32/34) + https://www.googleapis.com/auth/userinfo.profile PASS (33/34) + https://www.googleapis.com/auth/youtube.readonly PASS (34/34) +Some scopes FAILED! +To authorize them, please go to: + + https://admin.google.com/ac/owl/domainwidedelegation?clientScopeToAdd=https://mail.google.com/,https://sites.google.com/feeds,https://www.googleapis.com/auth/apps.alerts,https://www.googleapis.com/auth/calendar,https://www.googleapis.com/auth/classroom.announcements,https://www.googleapis.com/auth/classroom.coursework.students,https://www.googleapis.com/auth/classroom.courseworkmaterials,https://www.googleapis.com/auth/classroom.profile.emails,https://www.googleapis.com/auth/classroom.rosters,https://www.googleapis.com/auth/classroom.topics,https://www.googleapis.com/auth/cloud-identity,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/contacts,https://www.googleapis.com/auth/contacts.other.readonly,https://www.googleapis.com/auth/datastudio,https://www.googleapis.com/auth/directory.readonly,https://www.googleapis.com/auth/documents,https://www.googleapis.com/auth/drive,https://www.googleapis.com/auth/drive.activity,https://www.googleapis.com/auth/gmail.modify,https://www.googleapis.com/auth/gmail.settings.basic,https://www.googleapis.com/auth/gmail.settings.sharing,https://www.googleapis.com/auth/keep,https://www.googleapis.com/auth/spreadsheets,https://www.googleapis.com/auth/tasks,https://www.googleapis.com/auth/userinfo.profile,https://www.googleapis.com/auth/userinfo.email&clientIdToAdd=SVCACCTID&overwriteClientId=true&dn=domain.com&authuser=admin@domain.com + +You will be directed to the Google Workspace admin console Security/API Controls/Domain-wide Delegation page +The "Add a new Client ID" box will open +Make sure that "Overwrite existing client ID" is checked +Click AUTHORIZE +When the box closes you're done +After authorizing it may take some time for this test to pass so wait a few moments and then try this command again. + +C:\> +``` +The link shown in the error message should take you directly to the authorization screen. +If not, make sure that you are logged in as a domain admin, then re-enter the link. + +### Verify GAMADV-XTD3 service account access. + +Wait a moment and then perform the following command; it it still fails, wait a bit longer, it can sometimes take serveral minutes +for the authorization to complete. +``` +C:\>gam user admin@domain.com check serviceaccount +System time status: + Your system time differs from www.googleapis.com by less than 1 second PASS +Service Account Private Key Authentication: + Authentication PASS +Domain-wide Delegation authentication:, User: admin@domain.com, Scopes: 34 + https://mail.google.com/ PASS (1/34) + https://sites.google.com/feeds PASS (2/34) + https://www.googleapis.com/auth/analytics.readonly PASS (3/34) + https://www.googleapis.com/auth/apps.alerts PASS (4/34) + https://www.googleapis.com/auth/calendar PASS (5/34) + https://www.googleapis.com/auth/chat.delete PASS (6/34) + https://www.googleapis.com/auth/chat.memberships PASS (7/34) + https://www.googleapis.com/auth/chat.messages PASS (8/34) + https://www.googleapis.com/auth/chat.spaces PASS (9/34) + https://www.googleapis.com/auth/classroom.announcements PASS (10/34) + https://www.googleapis.com/auth/classroom.coursework.students PASS (11/34) + https://www.googleapis.com/auth/classroom.courseworkmaterials PASS (12/34) + https://www.googleapis.com/auth/classroom.profile.emails PASS (13/34) + https://www.googleapis.com/auth/classroom.rosters PASS (14/34) + https://www.googleapis.com/auth/classroom.topics PASS (15/34) + https://www.googleapis.com/auth/cloud-identity PASS (16/34) + https://www.googleapis.com/auth/cloud-platform PASS (17/34) + https://www.googleapis.com/auth/contacts PASS (18/34) + https://www.googleapis.com/auth/contacts.other.readonly PASS (19/34) + https://www.googleapis.com/auth/datastudio PASS (20/34) + https://www.googleapis.com/auth/directory.readonly PASS (21/34) + https://www.googleapis.com/auth/documents PASS (22/34) + https://www.googleapis.com/auth/drive PASS (23/34) + https://www.googleapis.com/auth/drive.activity PASS (24/34) + https://www.googleapis.com/auth/drive.admin.labels PASS (25/34) + https://www.googleapis.com/auth/drive.labels PASS (26/34) + https://www.googleapis.com/auth/gmail.modify PASS (27/34) + https://www.googleapis.com/auth/gmail.settings.basic PASS (28/34) + https://www.googleapis.com/auth/gmail.settings.sharing PASS (29/34) + https://www.googleapis.com/auth/keep PASS (30/34) + https://www.googleapis.com/auth/spreadsheets PASS (31/34) + https://www.googleapis.com/auth/tasks PASS (32/34) + https://www.googleapis.com/auth/userinfo.profile PASS (33/34) + https://www.googleapis.com/auth/youtube.readonly PASS (34/34) +All scopes PASSED! + +Service Account Client name: SVCACCTID is fully authorized. + +C:\> +``` +### Update gam.cfg with some basic values +* `customer_id` - Having this data keeps Gam from having to make extra API calls +* `domain` - This allows you to omit the domain portion of email addresses +* `timezone local` - Gam will convert all UTC times to your local timezone +``` +C:\>gam info domain +Customer ID: C01234567 +Primary Domain: domain.com +Customer Creation Time: 2007-06-06T15:47:55.444Z +Primary Domain Verified: True +Default Language: en +... + +C:\>gam config customer_id C01234567 domain domain.com timezone local save verify +Config File: C:\GAMConfig\gam.cfg, Saved +Section: DEFAULT + activity_max_results = 100 + admin_email = '' + api_calls_rate_check = false + api_calls_rate_limit = 100 + api_calls_tries_limit = 10 + auto_batch_min = 0 + bail_on_internal_error_tries = 2 + batch_size = 50 + cacerts_pem = '' + cache_dir = C:\GAMConfig\gamcache + cache_discovery_only = true + channel_customer_id = '' + charset = utf-8 + classroom_max_results = 0 + client_secrets_json = client_secrets.json ; C:\GAMConfig\client_secrets.json + clock_skew_in_seconds = 10 + cmdlog = '' + cmdlog_max_backups = 5 + cmdlog_max_kilo_bytes = 1000 + config_dir = C:\GAMConfig + contact_max_results = 100 + csv_input_column_delimiter = , + csv_input_quote_char = '"' + csv_input_row_drop_filter = '' + csv_input_row_drop_filter_mode = anymatch + csv_input_row_filter = '' + csv_input_row_filter_mode = allmatch + csv_input_row_limit = 0 + csv_output_column_delimiter = , + csv_output_convert_cr_nl = false + csv_output_field_delimiter = ' ' + csv_output_header_drop_filter = '' + csv_output_header_filter = '' + csv_output_header_force = '' + csv_output_line_terminator = lf + csv_output_quote_char = '"' + csv_output_row_drop_filter = '' + csv_output_row_drop_filter_mode = anymatch + csv_output_row_filter = '' + csv_output_row_filter_mode = allmatch + csv_output_row_limit = 0 + csv_output_subfield_delimiter = '.' + csv_output_timestamp_column = '' + csv_output_users_audit = false + customer_id = C01234567 + debug_level = 0 + device_max_results = 200 + domain = domain.com + drive_dir = C:\GAMWork + drive_max_results = 1000 + drive_v3_native_names = true + email_batch_size = 50 + event_max_results = 250 + extra_args = '' + inter_batch_wait = 0 + license_max_results = 100 + license_skus = '' + member_max_results = 200 + message_batch_size = 50 + message_max_results = 500 + never_time = Never + no_browser = false + no_cache = false + no_update_check = true + no_verify_ssl = false + num_tbatch_threads = 2 + num_threads = 5 + oauth2_txt = oauth2.txt ; C:\GAMConfig\oauth2.txt + oauth2service_json = oauth2service.json ; C:\GAMConfig\oauth2service.json + output_dateformat = '' + output_timeformat = '' + people_max_results = 100 + print_agu_domains = '' + print_cros_ous = '' + print_cros_ous_and_children = '' + process_wait_limit = 0 + quick_cros_move = false + quick_info_user = False + reseller_id = '' + retry_api_service_not_available = false + section = '' + show_api_calls_retry_data = false + show_commands = false + show_convert_cr_nl = false + show_counts_min = 1 + show_gettings = true + show_gettings_got_nl = false + show_multiprocess_info = false + smtp_fqdn = '' + smtp_host = '' + smtp_password = '' + smtp_username = '' + timezone = local + tls_max_version = '' + tls_min_version = 'TLSv1_2' + todrive_clearfilter = false + todrive_clientaccess = false + todrive_conversion = true + todrive_localcopy = false + todrive_locale = '' + todrive_nobrowser = false + todrive_noemail = true + todrive_parent = root + todrive_sheet_timeformat = '' + todrive_sheet_timestamp = false + todrive_timeformat = '' + todrive_timestamp = false + todrive_timezone = '' + todrive_upload_nodata = true + todrive_user = '' + truncate_client_id = false + update_cros_ou_with_id = false + use_projectid_as_name = false + user_max_results = 500 + user_service_account_access_only = false + +C:\> +``` diff --git a/docs/Scripts.md b/docs/Scripts.md index 56451581..9102684c 100644 --- a/docs/Scripts.md +++ b/docs/Scripts.md @@ -1,7 +1,7 @@ # Scripts These scripts can be used to enhance GAM's capabilities; all are supported with Advanced GAM, -many are supported with Standard GAM. They require that Python 3 be installed on you computer. +many are supported with Legacy GAM. They require that Python 3 be installed on you computer. * https://github.com/taers232c/GAM-Scripts3 * https://www.python.org/ diff --git a/docs/Users-Calendars-Events.md b/docs/Users-Calendars-Events.md index 03059a4a..4b4f8386 100644 --- a/docs/Users-Calendars-Events.md +++ b/docs/Users-Calendars-Events.md @@ -26,6 +26,7 @@ * https://developers.google.com/calendar/v3/reference/events * https://developers.google.com/calendar/v3/reference/events/import * https://developers.google.com/calendar/api/guides/working-hours-and-location +* https://developers.google.com/calendar/api/guides/event-types#birthday ## Definitions * [``](Collections-of-Users) @@ -241,6 +242,7 @@ ``` ``` ::= + birthday| default| focustime| fromgmail| @@ -306,6 +308,7 @@ (attendee )| (attendeestatus [] [] )| available| + (birthday )| (color )| (colorindex|colorid )| (description )| diff --git a/docs/Users-Chat.md b/docs/Users-Chat.md index 1f7a53a5..3dd900a3 100644 --- a/docs/Users-Chat.md +++ b/docs/Users-Chat.md @@ -1,7 +1,6 @@ # Users - Chat - [API documentation](#api-documentation) - [Introduction](#introduction) -- [Developer Preview Admin Access](#developer-preview-admin-access) - [Set up a Chat Bot](#set-up-a-chat-bot) - [Definitions](#definitions) - [Manage Chat Spaces](#manage-chat-spaces) @@ -30,36 +29,11 @@ To use these commands you must update your service account authorization. gam user user@domain.com update serviceaccount [*] 4) Chat API - Memberships (supports readonly) +[*] 5) Chat API - Memberships Admin (supports readonly) [*] 6) Chat API - Messages (supports readonly) [*] 7) Chat API - Spaces (supports readonly) -[*] 9) Chat API - Spaces Delete - -``` - -## Developer Preview Admin Access -The Chat API Developer Preview allows an admin to perform certain actions -on all Chat Spaces. These commands were added in version 6.77.00. - -You must be enrolled in the Developer Preview program for the CHAT API 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 -``` -To use these commands you must update your service account authorization. -``` -gam user user@domain.com update serviceaccount - -[*] 5) Chat API - Memberships Admin (supports readonly) [*] 8) Chat API - Spaces Admin (supports readonly) +[*] 9) Chat API - Spaces Delete [*] 10) Chat API - Spaces Delete Admin ``` @@ -71,15 +45,6 @@ Added `use_chat_admin_access` Boolean variable to `gam.cfg`. * Default: False ``` -If your account is not enrolled in the Chat API Developer Preview, you will see errors like this: -``` -$ gam user admin@domain.com show chatspaces asadmin -Getting all Chat Spaces that match query (customer = "customers/my_customer" AND spaceType = "SPACE") for admin@domain.com(asadmin) -Chat Admin: admin@domain.com(asadmin), Show Failed: Method not found. -``` - -To enroll in the Developer Preview program, see: https://developers.google.com/workspace/preview - Google requires that you have a Chat Bot configured in order to use the Chat API; set up a Chat Bot as described in the next section. ## Set up a Chat Bot @@ -398,7 +363,6 @@ When using the `formatjson` option, double quotes are used extensively in the da The `quotechar ` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output. `quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used. - ## Manage Chat Members ### Add members to a user's chat space ``` diff --git a/docs/Users-Drive-Files-Manage.md b/docs/Users-Drive-Files-Manage.md index 27fd3ed5..094a5e1e 100644 --- a/docs/Users-Drive-Files-Manage.md +++ b/docs/Users-Drive-Files-Manage.md @@ -208,7 +208,7 @@ If `noduplicate` is specfied, GAM will issue a warning and not perform the creat exists in the parent folder. By default, when files are uploaded from local content, they are created with `binary` format, i.e., the data is uploaded -without any conversion. Standard GAM had an option `convert` that was passed to the Drive API v2 that it used. +without any conversion. Legacy GAM had an option `convert` that was passed to the Drive API v2 that it used. * convert - Whether to convert this file to the corresponding Docs Editors format Advanced GAM uses Drive API v3 that doesn't support the `convert` option; it uses the `mimetype` argument to cause conversions. diff --git a/docs/Users.md b/docs/Users.md index bd4e84e0..8a776302 100644 --- a/docs/Users.md +++ b/docs/Users.md @@ -80,6 +80,22 @@ queries "`"orgUnitPath=\'/Students/Lower\ School/2027\'`",`"orgUnitPath=\'/Stude * [``](Collections-of-Users) * [Command data from Google Docs/Sheets/Storage](Command-Data-From-Google-Docs-Sheets-Storage) ``` + ::= + ::= + ::= + https://storage.cloud.google.com//| + https://storage.googleapis.com//| + gs:///| + / + + ::= + ||( ) + + ::= |id: + ::= + ||( ) +``` +``` ::= allmail| abridged|daily| @@ -736,7 +752,7 @@ When updating a user's password, you can send a message with the new password to In versions of GAMADV-XTD3 prior to 5.07.00, if you do `gam update users ` or `gam update users` and specify `password random`, all of the users in `` are assigned the same random password; -this is the same behavior as in Standard GAM. If you would like each of the users in `` to be +this is the same behavior as in Legacy GAM. If you would like each of the users in `` to be assigned a unique random password, specify `password uniquerandom`. If you update a user with `password random|uniquerandom`, the `lograndompassword ` option causes GAM diff --git a/docs/Version-and-Help.md b/docs/Version-and-Help.md index 1d9857a1..6cdba7a6 100644 --- a/docs/Version-and-Help.md +++ b/docs/Version-and-Help.md @@ -3,7 +3,7 @@ Print the current version of Gam with details ``` gam version -GAMADV-XTD3 7.00.02 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 7.00.04 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.5 64-bit final MacOS Sonoma 14.5 x86_64 @@ -15,7 +15,7 @@ Time: 2023-06-02T21:10:00-07:00 Print the current version of Gam with details and time offset information ``` gam version timeoffset -GAMADV-XTD3 7.00.02 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 7.00.04 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.5 64-bit final MacOS Sonoma 14.5 x86_64 @@ -27,7 +27,7 @@ Your system time differs from www.googleapis.com by less than 1 second Print the current version of Gam with extended details and SSL information ``` gam version extended -GAMADV-XTD3 7.00.02 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 7.00.04 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.5 64-bit final MacOS Sonoma 14.5 x86_64 @@ -64,7 +64,7 @@ MacOS High Sierra 10.13.6 x86_64 Path: /Users/Admin/bin/gamadv-xtd3 Version Check: Current: 5.35.08 - Latest: 7.00.02 + Latest: 7.00.04 echo $? 1 ``` @@ -72,7 +72,7 @@ echo $? Print the current version number without details ``` gam version simple -7.00.02 +7.00.04 ``` In Linux/MacOS you can do: ``` @@ -82,7 +82,7 @@ echo $VER Print the current version of Gam and address of this Wiki ``` gam help -GAM 7.00.02 - https://github.com/taers232c/GAMADV-XTD3 +GAM 7.00.04 - https://github.com/taers232c/GAMADV-XTD3 Ross Scroggs Python 3.12.5 64-bit final MacOS Sonoma 14.5 x86_64 diff --git a/docs/_Sidebar.md b/docs/_Sidebar.md index 52c81653..0ff111cc 100644 --- a/docs/_Sidebar.md +++ b/docs/_Sidebar.md @@ -3,9 +3,9 @@ Update History Installation * [How to Install Advanced GAM](How-to-Install-Advanced-GAM) +* [How to Update Advanced GAM to GAM7](How-to-Update-Advanced-GAM-to-GAM7) * [How to Update Advanced GAM](How-to-Update-Advanced-GAM) -* [How to Upgrade from Standard GAM](How-to-Upgrade-from-Standard-GAM) -* [How to Upgrade from GAMADV-X or GAMADV-XTD](How-to-Upgrade-from-GAMADV-X-or-GAMADV-XTD) +* [How to Upgrade from Legacy GAM](How-to-Upgrade-from-Legacy-GAM) * [Install GAM as Python Library](Install-GAM-as-Python-Library) * [GAMADV-XTD3 on Chrome OS Devices](GAMADV-XTD3-on-Chrome-OS-Devices) * [GAMADV-XTD3 on Android Devices](GAMADV-XTD3-on-Android-Devices) diff --git a/docs/gam.cfg.md b/docs/gam.cfg.md index f8510808..78bc2446 100644 --- a/docs/gam.cfg.md +++ b/docs/gam.cfg.md @@ -944,11 +944,11 @@ domain = goo.com customer_id = my_customer config_dir = goo ``` -### Existing clients that have been accessed with Standard GAM. +### Existing clients that have been accessed with Legacy GAM. You have two clients: foo and goo. Make sub-directories foo and goo in the same folder/directory as gam.cfg. -For each client, copy the client_secrets.json and oauth2service.json files from their Standard GAM location -to the appropriate sub-directory. If the Standard Gam files do not have these names, +For each client, copy the client_secrets.json and oauth2service.json files from their Legacy GAM location +to the appropriate sub-directory. If the Legacy Gam files do not have these names, rename them after copying them to the sub-directory. Perform the following commands for each client (replace xxx with foo and goo). diff --git a/src/GamCommands.txt b/src/GamCommands.txt index b0f27def..f6adcfc2 100644 --- a/src/GamCommands.txt +++ b/src/GamCommands.txt @@ -1594,6 +1594,7 @@ gam calendar printacl [todrive *] ::= accepted|declined|needsaction|tentative ::= + birthday| default| focustime| fromgmail| @@ -5847,6 +5848,7 @@ gam transfer calendars|seccals [ ::= accepted|declined|needsaction|tentative ::= + birthday| default| focustime| outofoffice| @@ -5896,13 +5898,15 @@ gam transfer calendars|seccals [ ::= accepted|declined|needsaction|tentative ::= + (allday )| (anyonecanaddself [])| (attachment )| (attendee )| (attendeestatus [] [] )| available| + (birthday )| (color )| - (colorindex|colorid ))| + (colorindex|colorid )| (description )| (end|endtime (allday )|