If your organization uses Google Workspace, consider installing Google Apps Manager to help streamline processes and complete bulk actions. The tool works directly with Google Workspace and lets you run commands to execute tasks more efficiently. This guide explains what Google Apps Manager is, how it can be used, and how you can get it set up.
What is Google Apps Manager Anyway?
Google Apps Manager is a command line tool for Google Workspace administrators. Users can download this third-party software to help manage several Google Workspace functions. The tool lets admins quickly perform organization-wide actions like renaming domains, adding and categorizing users, and resetting everyone’s passwords instantly.
How Google Apps Manager Works
If you aren’t familiar with command line tools, they are programs, libraries, and scripts that help run software platforms and solve their unique problems. Google Apps Manager works by integrating with the Google Workspace platform. Once it’s set up, users can run commands to perform bulk actions that they can’t complete with Google Workspace alone.
Google Apps Manager includes several commands and codes that users can enter to perform various tasks. These commands save time, complete tasks more efficiently, and enhance the overall Google Workspace experience.
To use this tool, you’ll want to have basic technical experience because commands can be long and complex. However, mastering this tool will make managing Google Workspace easier and more time-efficient.
Example 1: Generating User List
Global Technologies is an enormous corporation with 65 locations worldwide. Every employee has a business Google Workspace account, and Tyler is the company’s main Google Workspace administrator. On Monday morning, the company’s CEO asks Tyler to generate a list of every employee in the company before the day is over.
Because the request is time-sensitive, Tyler needs a way to quickly generate a document automatically. Fortunately, he already has Google Apps Manager installed and ready for use.
Tyler opens the Google Apps Manager console window and runs the command, “gam print users todrive”. This command instantly generates a Google Worksheet listing every Google Workspace user in the company. He simply pulls up his Google Drive, opens the sheet, and sends it to the CEO.
Without the help of Google Apps Manager, there’s no way Tyler could have generated the list before the end of the day. He would’ve had to manually enter in all employee names, which would have taken weeks. This example demonstrates the automatic bulk action capabilities that Google Apps Manager can bring to any organization using Google Workspace.
Example 2: Mass User Upload
Hillside High School wants to onboard all staff and students onto Google Workspace so they can use apps like Gmail, Google Calendar, and Google Drive to stay organized. Its Google Workspace administrator, Mallory, needs a way to bulk upload everyone onto the platform and separate staff and students. She decides to download Google Apps Manager for assistance.
Before she downloads the software, she sets up an organizational structure within Google Workspace. She does this by creating three different organizational structures titled “/Staff/IT”, /Staff/Teachers”, and “/Students”. By separating students from staff, she can perform bulk setting changes like adding YouTube restrictions for students only.
From there, she creates a CSV with everyone’s first and last name, email address, password, and organizational unit. She enters student information by typing in the example text, “FirstName,LastName,email@example.com,Password,/Students”.
She adds staff members by entering their information with a slightly different format, “FirstName,LastName,firstname.lastname@example.org,Password,/Staff”. By separating users into different organizational units on the CSV, she ensures that staff and students will be separated once she uploads them to Google Apps Manager.
Next, she configures and installs Google Apps Manager and uploads the CSV by running the command, “gam csv users.csv gam create user ~PrimaryEmail firstname ~FirstName lastname ~LastName password ~Password org ~OrgUnit changepassword on”. All users are now added to Google Workspace without the need to add them individually.
With the help of Google Apps Manager, Mallory was able to quickly add and categorize all her staff and students onto the platform. This example shows how powerful the tool is and how any organization can mass upload new users to Google Workspace.
How to Get Started With Google Apps Manager
Before You Get Started
Before you set up Google Apps Manager, you need to check a few things. First, you must have a paid Google Workspace account that’s not currently under the free trial. Second, your Google Workspace account must be domain verified. Third, you must have a facility with command line prompts.
Once you can verify these three steps, make sure you don’t have any conflicting accounts. A conflicting account happens when users have a managed Google account with the same email address as their personal Google account.
This often happens when a member of your organization makes a personal account using the organization’s name before the organization creates a managed Google account. Use the Transfer tool for unmanaged users to check for personal accounts with the same email address as your organization.
After verifying you have no conflicting accounts, you’re ready to begin. Setting up Google Apps Manager requires several complicated steps, but we broke it down into actionable pieces to make your setup process as simple as possible.
Set an Organizational Structure
To begin, create an organizational unit hierarchy. We’ll break down this topic in-depth in case you’re unfamiliar with Google organizational structures.
A top-level organizational unit is a single unit where all your devices and users are placed first in your Google Admin console. When you change Admin console settings, it applies to the entire top-level organizational unit.
If you want to separate users into different categories, you can create child organizational units. For example, if you want to apply different settings to your company’s sales department, you can create a child organizational unit containing only the Google accounts of sales employees.
You can do this by adding their email address to the child organizational unit bar below the top level within Google Admin Settings. By separating them, you can now create settings that only apply to the child organizational unit.
For example, you can allow Google Docs and Gmail for the top-level organizational unit, while only allowing Gmail for the child organizational unit users. Google recommends creating different organizational units for devices and users so you can change the settings for each separately.
You can add unlimited organizational units under the top level, and you can make them the same level or into a hierarchy. The child organizational units set to inherit top-level settings will change when the top-level settings are changed, but they will not if they have custom settings.
For setting up Google Apps Manager, create an organizational structure that’s uncomplicated. Google recommends granting access to child organizational units by restricting feature and service availability at the top-level unit.
It also recommends focusing on categorizing by functionality when dividing users into groups. You can always go back and change this later if needed.
Create a Data Source
Next, you need to create a CSV file containing FirstName, LastName, PrimaryEmail, Password, and OrgUnit. The PrimaryEmail pertains to the Google email address that the user signs in with, and the passwords must be at least eight characters.
The OrgUnit field pertains to which organizational unit the user is assigned to. Type “/” to add users to the top-level organizational unit and divide units by also typing “/”. For example, you can create a child unit for external sales by typing, “/sales/external”.
Install Google Apps Manager
Before executing, Google recommends creating a file named “noshorturls.txt” and putting it in the same folder as the Google Apps Manager. The purpose of this is to turn off gam-shortn.appspot.com short URLs.
Next, download Google Apps Manager. Google recommends downloading it from GitHub by navigating to https://github.com/jay0lee/GAM/wiki#download-gam. Downloading for Windows and Mac users is slightly different.
Windows users can head to the Google Apps Manager Releases page on GitHub by navigating to https://github.com/jay0lee/GAM/releases. From there, you’ll want to download the latest Windows MSI version. As of writing, Google Apps Manager 5.30 is the latest version, and the file name to download is “gam-5.30-windows-x86_64.msi”.
Click the file and run the MSI installer. Google Apps Manager will automatically install to C:\GAM, and a command prompt will direct you to set up a project and authorize user data access and admin management. To run commands as a Windows user, navigate to Start, then Programs, then Accessories, then Command Prompt.
For Mac and Linux users, start by opening a shell prompt in the Mac OS terminal app and run “bash <(curl -s -S -L https://git.io/install-gam)”. If you run into any issues, you can simply copy and paste the commands from the GitHub Google Apps Manager set up directions online. These can be found by navigating to https://github.com/jay0lee/GAM/wiki#download-gam.
Once this is entered, the latest version of Google Apps Manager will be downloaded. Install it to your $HOME/bin/gam directory. You will then be prompted to set up a project and authorize user data access and admin management.
If you need to update Google Apps Manager as a Mac user, run “bash <(curl -s -S -L https://git.io/install-gam) -1”.
Before you can start using Google Apps Manager, you need to create a project, authorize admin access, and authorize user data and settings access.
Create a Project
You should be prompted to run a project automatically, but you can run “gam create project” if you weren’t prompted. First, enter the super admin for your Google Workspace account’s email address.
Next, you’ll either be given a URL or directed to a website asking you to authorize Google Apps Manager to create projects as the specified admin. Select allow and copy the code if you’re given one. Then navigate back to the Google Apps Manager window and a project will be created.
Next, turn on the application programming interfaces (APIs) needed for the project. Examples of these are Gmail, Google Drive, and Admin SDK. After this step, create a service account. After this step, you’ll be prompted to create an OAuth client ID.
You can complete this by navigating to the URL given and following the provided steps. Copy the client ID and secret and navigate back to Google Apps Manager when prompted.
Finally, you’ll be asked to make a change to your service account in your browser. Enable Google Workspace Domain-Wide Delegation then return to the Google Apps Manager console window.
Users can skip Domain-Wide Delegation by answering “no” when asked if they’re ready to authorize Google Apps Manager to manage Google Workspace user data and settings.
Authorize Admin Access
You should be automatically prompted to authorize admin access, but you can start it manually by running “gam oauth create”. Enter the super admin for your Google Workspace account’s email address.
A list of usable APIs will appear, and the most important ones are automatically selected. Most users can leave the list as it is, but you can edit it if you’re experienced with Google Apps Manager. Press C to continue.
You’ll then either be given a URL or automatically directed to a website. From there, authorize admin access. You may be asked to copy a code as well. Finally, navigate back to the Google Apps Manager console window.
Authorize User Data and Settings Access
Authorizing user data and settings access should start automatically, or you can start it manually by running “gam user email@example.com check serviceaccount”.
Next, you’ll be asked to enter a non-admin account’s email address that’s in your Google Workspace domain. This account must have Google Calendar, Google Drive, and Gmail enabled to connect to Google Apps Manager.
Google Apps Manager will then start the authentication process. It’s likely to fail during the first run, however. If this happens, you’ll be given a URL. Navigate to this URL and carefully copy the Client name and list of scopes provided. Authorize the Client name for the scopes in the admin console.
Next, enter Y or run “gam user firstname.lastname@example.org check serviceaccount” again to re-run the check. It should pass after a few minutes of running. If it fails again, cross-check the Client name and each scope to make sure they’re entered correctly.
If you receive a client not found 401 error code, make sure the client_secrets.json file in the Google Apps Manager directory matches your Google Workspace API client ID and customer secrets.
Run Google Apps Manager
To make sure Google Apps Manager is linked to the correct Google Workspace account, run “gam info domain”. You’ll then be asked which scopes the OAuth token should support. Choose the last option to select all scopes.
Next, you’ll be directed to a web page where you’ll grant access to make changes to your Google Workspace account and retrieve data. Make sure you’re logged into a Google Workspace Administrator account before you authorize.
Finally, navigate back to the Google Apps Manager console window, and you’re now ready to use the tool.
Once you’re set up, you can create new users inside Google Apps Manager by linking to the CSV you created earlier. To link to the CSV, run the command, “gam csv users.csv gam create user ~PrimaryEmail firstname ~FirstName lastname ~LastName password ~Password org ~OrgUnit changepassword on”.
Make sure to have a different initial password for each user. By including “changepassword on”, every user will be prompted to change their password after signing on for the first time.