This lesson is part of the "TAMING GAM - A practical guide to GAM and GAMADV-XTD3" course.
Here we will walk you through the set up of GAMADV-XTD3 on a macOS Virtual Machine. This will also work on any version of macOS.
You can either follow along with the images and steps below, or watch the video.
If you are trying to install GAM on another operating system, please refer to these articles:
Are you however trying to just upgrade your installation of GAM?
Let's get started.
Let's download the installation of GAMADV-XTD3 from the Downloads page.
At the time of recording this video, we installed GAMADV-XTD3 6.06.09.
Start a terminal session and execute this command, for a new installation in the default path $HOME/bin
bash <(curl -s -S -L https://git.io/fhZWP)
Depending on how you have set up your macOS, you may be prompted to install the Command Line Tools.
Once that has installed, which may take a couple of minutes, you will see this in your terminal.
Open a NEW terminal window.
We need to add a new line of code into the shell.
To get into your shell you will need to know what shell you are using. On a newish Mac, you are probably using ~/.zshrc. To see that this line was entered, we need to open a text editor. You can use whichever is on your machine, we are going to use Nano by running this command.
As you can see, there is a line that was added by the installation. We need to add this line into the text editor. And then save the file. To save, use CTRL X and then press Y and then press enter.
Now, let's create a GAMWork and GAMConfig directory in the macOS finder.
We need to now move into the GAM folder. You will see that I started by running "ls". This will list the folders and files so that I can see where I am. Then I changed directory (cd see the red arrow) and moved myself into the bin/gamadv-xtd3 directory. I then ran "ls" again to see what was in that folder.
We then want to initialise GAMADV-XTD3 by running this command.
./gam config drive_dir /Users/admin/GAMWork verify
Verify the installation
ls -l ~/.gam
Now return to the first terminal window.
We can run a browser on this machine, so press Y
And then enter a Google Workspace email.
Once you have added the admin email address, it will start running through the process of actually creating the Google App.
Select the link provided and paste it into your browser. You will need to make a desktop app and name it something like GAM.
Then copy and paste your Client ID and Client Secret into the terminal.
Now are you ready to authorise GAM to perform Google Workspace Management Operations? Just type Y
Now choose the API you would like to authorise. You can select all scopes by using S, Unselect all using U, or press C to continue to Authorisation. If you would like to enable or disable API Scopes, you can just type the numbers that correspond to the various Scopes, and they will enable or disable.
When you press C you will be transferred to your Workspace and you will have to click allow authorising.
Then back at the terminal, press Y to advise you are ready to authorise and then type in a regular Workspace user.
These will all fail the first time it runs.
Then copy and paste the long link from your terminal into your browser.
Then we need to authorise the new Client ID.
Then go back to the terminal and try again by pressing Y and you will see the scopes all passing.
Either copy and paste the command from your terminal to restart the terminal or just close and open it again. Then we are going to test that it works by running this command.
gam info domain
There are some other options that are suggested that you can run.
gam config customer_id xxxx domain xxxx.com timezone local save verify
So that was a quick lesson on how to get GAM set up for your domain on macOS. If you would like more info on how to use GAM and GAMADV-XTD3 for your Google Workspace, check out this full online course of over 9 hours, including 50 pages of free resources, here.