Update your Bookmarks to https://sites.google.com/view/gam--commands/home
This is a collection of GAM commands I use or have kept, waiting for the time they "save the day".
I am running GAMADV-XTD3 in the cloud. But use commands from both GAM & GAMADV-XTD3 as needed, although I am not always sure which is which. Some commands are taken from the Google Group and the Google Chat Space, some I have managed to work out myself.
GAMADV-XTD3 commands may not work in a GAM enviroment. But I am sure GAM commands will work in a GAMADV-XTD3 enviroment.
GAMADV-XTD3 has additional functionality over standard GAM.
Where possible I have tested all of these commands, however I take no responsibility for their use. Always test commands before running them in a production environment.
Run this command to update a Cloud install of GAMADV-XTD3
bash <(curl -s -S -L https://git.io/fhZWP) -l
The .bashrc or the .profile files may include an Alias entry. This needs to point to the correct version of GAM.
alias gam="/home/your_folder_path/bin/gamadv-xtd3/gam"
gam version
This command will check and display the Current & Latest version.
gam version checkrc
echo $?
If return is 0 then there were no errors for the last run command. Useful if you run GAM in the cloud and the connection gets reset.
View the config file
gam config verify
Prevent/Allow the file to open in the browser and/or send an email confirmation.
gam select default config todrive_nobrowser <Boolean> todrive_noemail <Boolean> save verify
gam user <Any Domain Email Address> check serviceaccount
They should all PASS, if not follow the directions onscreen. See this page for more info https://admin.google.com/ManageOauthClients. It can take a short while for all to PASS. You may need to run the above command a few times to check.
If so, then you should copy client_secrets.json, oauth2.txt and oauth2service.json from that computer
to /home/user_name/.gam in CloudShell.
On any computer in your domain, then do the following:-
gam create project
gam oauth create
gam user someuser@domain.com check serviceaccount
Not followed through as I has already set up in the Cloud Shell, but looks comprehensive.
https://basuta.com/ - Install GAM in Cloud Shell
If you get the Access Denied error message, try;-
gam oauth refresh
gam oauth update
gam user user@example.com check serviceaccount
gam info domain