Back to All Cheatsheet Libraries cheatsheets

Google Workspace Admin

Admin console reference, onboarding/offboarding runbooks with a full GAM offboarding script, 100 daily admin tips, and a security baseline.

Organisational Units are the decision you can't easily undo

Almost every Workspace setting is applied per OU, and policy inherits downward. Get the structure right before you have 500 users in it, because restructuring later means moving people between OUs and re-testing every inherited setting. Groups handle access and mail; OUs handle policy. Confusing the two is the most common structural mistake.

/ ← domain-wide defaults, deliberately restrictive ├── /Staff │ ├── /Staff/IT ← relaxed: admin tools, Marketplace installs │ └── /Staff/General ├── /Contractors ← tighter: no external sharing, no Takeout ├── /Service-Accounts ← non-human, 2SV exempt, heavily restricted └── /Suspended ← offboarded users parked here, all services off
Showing results
Area Where What you do there Notes
UsersDirectory → UsersCreate, suspend, rename, reset passwords, move OU, manage aliases.Bulk-update via CSV upload. Suspend rather than delete — deletion starts a 20-day recovery clock and complicates data transfer.
UsersDirectory → Organisational unitsThe policy hierarchy for users and devices.A user is in exactly one OU. Settings inherit down and can be overridden per OU.
UsersDirectory → GroupsMailing lists, access control, and Drive/Calendar sharing targets.Use groups for access, OUs for policy. Groups can be security groups for finer-grained permission assignment.
UsersDirectory → Directory settingsSharing of the global directory, profile editing, custom user fields.Custom fields (employee ID, manager, start date) are queryable via GAM and useful for automation.
SecuritySecurity → Authentication → 2-Step VerificationEnforce 2SV, set enrollment grace periods, allow/disallow methods.Enforce for admins first, always. Roll out to users with a grace period and a communications plan.
SecuritySecurity → Access and data control → API controlsWhich third-party apps may access Workspace data via OAuth.Set to trusted apps only. Unrestricted OAuth is how data quietly leaves an organisation.
SecuritySecurity → Access and data control → Context-Aware AccessConditional access by device state, IP, and location.Higher editions only. The Workspace analogue of Conditional Access.
SecuritySecurity → Alert centreSuspicious login, malware, data-loss, and government-attack warnings.Configure who receives alerts. An unmonitored alert centre is worse than none.
SecuritySecurity → Admin rolesDelegate scoped administrative privileges.Use pre-built or custom roles. Minimise Super Admins — see the Security tab.
AppsApps → Google Workspace → GmailRouting, compliance rules, spam/attachment policy, SPF/DKIM/DMARC.Routing rules are per-OU and evaluated in order — the usual cause of "why did that mail go there".
AppsApps → Google Workspace → Drive and DocsExternal sharing, shared drive creation rights, link defaults, Takeout.Sharing policy is per-OU. Contractors typically get a stricter OU than staff.
AppsApps → Google Workspace → CalendarExternal sharing of free/busy, resource (room) management.Rooms and equipment are created here under Buildings and resources.
AppsApps → Google Workspace Marketplace appsAllow-list third-party add-ons, install domain-wide.Pair with API controls. Domain-installed apps skip individual user consent.
DevicesDevices → Mobile & endpointsBasic or advanced mobile management, approval, and remote wipe.Account wipe removes only corporate data; device wipe factory-resets. Know which button you're pressing on a BYOD phone.
DevicesDevices → Chrome → Devices / SettingsChromebook enrollment, policies, kiosk and guest sessions.Requires a per-device Chrome Upgrade licence — see Workspace for Education.
ReportingReporting → Audit and investigationLogin, admin, Drive, Gmail, token, and device logs.The investigation tool (higher editions) allows bulk remediation directly from search results.
ReportingReporting → ReportsUsage, security posture, and app-adoption dashboards.Useful for spotting unused licences before a renewal.
BillingBilling → SubscriptionsLicence counts, plan changes, Archived User licences.Archived User (AU) licences retain a leaver's data at lower cost than a full seat — see the offboarding tab.
DataVault (vault.google.com)Retention rules, legal holds, eDiscovery search and export.Separate console. A legal hold overrides deletion, including for suspended and deleted users.

Onboarding — get it repeatable, then automate it

The goal is that a new starter has a working account, the right access, and no surprises on day one — without an admin remembering nine separate steps. Everything below has a GAM equivalent in the next tab.

1

Create the account in the correct OU

OU determines every inherited policy, so setting it at creation avoids a second pass. Agree a naming convention early (first.last@ is typical) and stick to it — inconsistency here haunts automation forever.

gam create user first.last@example.com \ firstname First lastname Last \ org "/Staff/General" \ password "$(openssl rand -base64 18)" changepassword on
2

Add to groups by role, not individually

Group membership should follow the job. Maintain a role→groups mapping so "Sales rep" always produces the same access — this is what makes onboarding auditable.

3

Assign the licence

Verify the correct SKU. Users without a licence can be created but can't use paid services, which produces confusing "it's broken" tickets on day one.

4

Enforce 2SV enrollment with a grace period

Set a new-user enrollment window (commonly 1–7 days). Long enough to get a phone set up, short enough that it actually happens.

5

Populate the directory profile

Manager, department, employee ID, start date. These drive dynamic groups, org charts, and offboarding automation later — fill them in now or you'll be back-filling under pressure.

6

Provision the device

Chromebook enrollment, or MDM enrollment for Mac/Windows. See MDM Fundamentals for zero-touch paths.

7

Send credentials out of band

Never email a temporary password to the personal address you also used as the recovery address. Send it via a separate channel (SMS, manager, password manager invite).

Offboarding — order matters more than speed

Two rules that prevent most offboarding disasters

1. Suspend before you do anything else. Suspension is instant and reversible; it stops access while you work through the rest at a sane pace.

2. Never delete until data is transferred. Deletion starts a 20-day recovery window, complicates transfer, and is the single most common way organisations permanently lose a departed employee's work.

1

Suspend the account

Immediately blocks sign-in everywhere. Do this at the agreed termination time, not after the exit interview.

gam update user leaver@example.com suspended on
2

Kill live sessions and revoke tokens

Suspension blocks new sign-ins but existing session cookies and OAuth tokens can persist. deprovision revokes application-specific passwords, OAuth tokens, backup codes, and un-enrolls security keys in one command.

gam user leaver@example.com signout gam user leaver@example.com deprovision
3

Reset the password

Belt and braces — ensures no cached credential works even if suspension is later reversed by mistake.

gam update user leaver@example.com password random
4

Capture group memberships before removing them

Export first. If the departure is disputed or reversed, you'll need to know what they had — and it's the only record of role-based access after the fact.

gam print groups member leaver@example.com > leaver-groups.csv gam user leaver@example.com delete groups
5

Transfer Drive ownership

Use a data transfer, which moves ownership of files in My Drive to the successor. Shared drive content isn't owned by the user and stays put — that's a good reason to keep team content in shared drives in the first place.

gam create datatransfer leaver@example.com gdrive \ manager@example.com privacy_level shared,private
6

Handle mail — forward, delegate, or autoreply

Pick deliberately. Delegation lets the manager read the mailbox without receiving a copy; forwarding pushes new mail onward; an autoresponder tells senders where to go instead. Many organisations do all three for a fixed window.

gam user leaver@example.com add delegate manager@example.com gam user leaver@example.com forward on manager@example.com keep gam user leaver@example.com vacation on \ subject "No longer with the company" \ message "Please contact team@example.com." contactsonly off
7

Transfer calendar ownership

Recurring meetings the leaver organised will otherwise become unmanageable. Transfer events and any resources they own.

gam create datatransfer leaver@example.com calendar \ manager@example.com release_resources true
8

Wipe or unenroll devices

Account wipe for BYOD (removes only corporate data). Device wipe only for company-owned hardware. Getting this wrong on a personal phone is a serious incident.

9

Move to the Suspended OU and strip the alias

Parking suspended users in their own OU with all services disabled prevents accidental reactivation with full access. Remove aliases so the address can be reused or bounce cleanly.

gam update user leaver@example.com org "/Suspended"
10

Switch to an Archived User licence

An AU licence retains the account's data for Vault search at a fraction of a full seat's cost. This is the correct answer to "we might need their mail later" — far better than paying for a full licence indefinitely.

11

Apply retention or legal hold, then delete on schedule

If there's any litigation risk, place a Vault hold before deletion — a hold preserves data even against deletion. Otherwise delete at the end of your documented retention window. Deletion is recoverable for 20 days, then permanent.

A complete offboarding script

Read before running

This is a working reference implementation, not a drop-in. It performs destructive, hard-to-reverse actions. Run it against a test account first, adjust to your retention policy, and keep the dry-run flag until you've seen the output you expect.

#!/usr/bin/env bash # offboard.sh — Google Workspace offboarding # Usage: ./offboard.sh leaver@example.com manager@example.com [--live] # # Defaults to DRY RUN. Pass --live to actually execute. # Order is deliberate: cut access first, preserve data second, # destructive cleanup last. set -euo pipefail LEAVER="${1:?usage: offboard.sh [--live]}" MANAGER="${2:?manager address required}" LIVE="${3:-}" STAMP="$(date +%Y%m%d-%H%M%S)" LOGDIR="./offboard-${LEAVER%%@*}-${STAMP}" SUSPENDED_OU="/Suspended" mkdir -p "$LOGDIR" run() { if [ "$LIVE" = "--live" ]; then echo "+ gam $*" | tee -a "$LOGDIR/actions.log" gam "$@" else echo "[DRY RUN] gam $*" | tee -a "$LOGDIR/actions.log" fi } echo "=== Offboarding $LEAVER -> $MANAGER ===" [ "$LIVE" = "--live" ] || echo "*** DRY RUN — pass --live to execute ***" # 0. Snapshot BEFORE changing anything. This is the only record of what # the account had, and you cannot reconstruct it afterwards. echo "--- capturing pre-change state ---" gam info user "$LEAVER" > "$LOGDIR/user-info.txt" 2>&1 || true gam print groups member "$LEAVER" > "$LOGDIR/groups.csv" 2>&1 || true gam user "$LEAVER" print filelist > "$LOGDIR/drive-files.csv" 2>&1 || true gam user "$LEAVER" show delegates > "$LOGDIR/delegates.txt" 2>&1 || true gam user "$LEAVER" show forwards > "$LOGDIR/forwards.txt" 2>&1 || true # 1. CUT ACCESS — instant and reversible. echo "--- 1. revoking access ---" run update user "$LEAVER" suspended on run user "$LEAVER" signout run user "$LEAVER" deprovision # tokens, app passwords, backup codes, keys run update user "$LEAVER" password random # 2. PRESERVE DATA — must happen before any deletion. echo "--- 2. transferring data ---" run create datatransfer "$LEAVER" gdrive "$MANAGER" privacy_level shared,private run create datatransfer "$LEAVER" calendar "$MANAGER" release_resources true # 3. MAIL CONTINUITY — delegate + forward + autoresponder. echo "--- 3. mail handling ---" run user "$LEAVER" add delegate "$MANAGER" run user "$LEAVER" forward on "$MANAGER" keep run user "$LEAVER" vacation on \ subject "No longer with the company" \ message "This person has left. Please contact ${MANAGER}." \ contactsonly off # 4. STRIP ACCESS SURFACE. echo "--- 4. removing group memberships ---" run user "$LEAVER" delete groups # 5. PARK the account. echo "--- 5. moving to suspended OU ---" run update user "$LEAVER" org "$SUSPENDED_OU" echo echo "=== Complete. Logs: $LOGDIR ===" cat <<NEXT Manual follow-up (deliberately NOT automated): * Wipe/unenroll devices — choose ACCOUNT wipe for BYOD, DEVICE wipe only for company-owned hardware. * Switch to an Archived User licence to cut cost while retaining data. * Apply a Vault retention rule or legal hold if there is any dispute or litigation risk. A hold survives deletion; nothing else does. * Delete the account only after the documented retention window. Deletion is recoverable for 20 days, then permanent. * Reassign or remove any shared drive manager role they held. NEXT
Offboarding mistakes that cost real money
  • Deleting before transferring Drive. The most common and most expensive error. Suspend, transfer, then delete.
  • Forgetting shared drive manager roles. A shared drive whose only manager has been deleted becomes unmanageable — audit for sole managers before offboarding.
  • Device-wiping a personal phone. Account wipe versus device wipe is a one-click difference with a very different outcome.
  • Leaving the licence assigned. Paying full price for suspended accounts adds up quietly. Archived User licences exist for exactly this.
  • Not capturing group membership first. Once removed, there's no record of what access they had — which matters if the departure becomes contested.
  • Missing Vault holds. If legal asks six months later and you deleted on schedule, the data is gone. Check for hold obligations before deleting.

GAM — the tool that makes Workspace administration scalable

The Admin console is fine for one user. GAM (Google Apps Manager) is how you do anything to a hundred of them, script an offboarding, or answer "which accounts haven't logged in for 90 days?" in one line. It's open source, free, and effectively the standard tool for Workspace admins.

Two projects, and people confuse them: GAM7 is the mainline project. GAMADV-XTD3 is an advanced fork with extra commands and different syntax in places. Start with GAM7; move to the fork only if you hit a specific gap.

Installing and authorising

1

Install

The installer downloads GAM, places it in ~/bin/gam7 (or your chosen path), and starts the setup wizard.

# macOS / Linux bash <(curl -s -S -L https://gam-shortn.appspot.com/gam-install) # Windows — download the EXE installer from GitHub Releases # Or as a Python package, if you manage your own Python pip install gam7
2

Create a Google Cloud project and authorise

The wizard walks you through it. GAM needs its own Cloud project with the Admin SDK and related APIs enabled — use a dedicated project, not one shared with production workloads.

gam create project gam oauth create # browser sign-in, writes oauth2.txt gam user admin@example.com check serviceaccount
3

Authorise domain-wide delegation for the service account

Some commands act as a user (reading their Drive, setting their signature). That requires the service account to hold domain-wide delegation scopes, granted in the Admin console under Security → API controls → Domain-wide delegation. check serviceaccount tells you exactly which scopes are missing.

4

Verify it works

gam version gam info domain gam info user admin@example.com
5

Protect the credentials — they are super-admin equivalent

oauth2.txt, oauth2service.json, and client_secrets.json in the GAM config directory grant full administrative control of your Workspace tenant. Treat them exactly like a root private key: never commit them, never put them in shared storage, restrict file permissions, and revoke immediately if a machine is lost.

chmod 600 ~/.gam/oauth2.txt ~/.gam/oauth2service.json
Showing results
Area Task Command Notes
InfoDomain overviewgam info domainVerifies auth is working. Always the first command to run on a new setup.
InfoUser detailgam info user user@example.comAdd noaliases or nogroups to trim output.
InfoGAM versiongam versionInclude this when asking for help — behaviour differs across versions.
UsersCreate a usergam create user first.last@example.com firstname First lastname Last password "S3cret!" changepassword onAdd org "/Path" to place them in an OU at creation.
UsersSuspend / restoregam update user user@example.com suspended on|offInstant and reversible. Always the first offboarding step.
UsersReset passwordgam update user user@example.com password random changepassword onrandom generates and prints a strong password.
UsersMove OUgam update user user@example.com org "/Staff/IT"Policy changes follow the OU move, sometimes after a short delay.
UsersAdd an aliasgam create alias sales@example.com user user@example.comAliases are free and don't consume a licence.
UsersDeprovision (revoke everything)gam user user@example.com deprovisionRevokes app passwords, OAuth tokens, backup codes, and un-enrolls security keys. Essential in offboarding.
UsersForce sign-outgam user user@example.com signoutInvalidates active session cookies — suspension alone may not drop live sessions instantly.
UsersDelete / undeletegam delete user user@example.com · gam undelete user user@example.com20-day recovery window. After that it's permanent.
UsersExport all usersgam print users fields primaryemail,name,ou,suspended,lastlogintime > users.csvThe workhorse reporting command. Pipe into a spreadsheet for audits.
UsersFind dormant accountsgam print users query "isSuspended=false" fields primaryemail,lastlogintimeSort by last login to find licences worth reclaiming.
GroupsList all groupsgam print groupsAdd members managers owners to include membership counts.
GroupsGroup detailgam info group team@example.comShows settings and membership.
GroupsAdd / remove a membergam update group team@example.com add member user@example.comSwap add for remove; roles are member, manager, owner.
GroupsA user's groupsgam print groups member user@example.comCapture this before offboarding — it's the only record afterwards.
GroupsRemove from all groupsgam user user@example.com delete groupsIrreversible in one step — export first.
DriveList a user's filesgam user user@example.com print filelistLarge mailboxes take a while. Redirect to CSV.
DriveTransfer Drive ownershipgam create datatransfer old@example.com gdrive new@example.com privacy_level shared,privateOnly transfers My Drive. Shared drive content is owned by the drive, not the user.
DriveCheck transfer statusgam print datatransfersTransfers are asynchronous — verify completion before deleting the source account.
DriveFind externally-shared filesgam user user@example.com print filelist query "visibility='anyoneWithLink'"A genuinely useful security audit across the domain.
DriveList shared drivesgam print shareddrivesAudit for shared drives with only one manager before that person leaves.
GmailAdd a delegategam user user@example.com add delegate manager@example.comDelegate reads the mailbox without receiving copies.
GmailSet forwardinggam user user@example.com forward on manager@example.com keepkeep retains a copy; alternatives are archive, delete, markread.
GmailSet autorespondergam user user@example.com vacation on subject "Away" message "..." contactsonly offSet contactsonly off so external senders get it too.
GmailSet a signaturegam user user@example.com signature file sig.html htmlCombine with a CSV loop to apply a templated signature domain-wide.
GmailShow filters / forwardsgam user user@example.com show filtersCheck for unauthorised auto-forwarding — a classic sign of account compromise.
CalendarTransfer calendar eventsgam create datatransfer old@example.com calendar new@example.com release_resources truerelease_resources frees any rooms the leaver had booked.
CalendarAdd a calendar ACLgam calendar cal@example.com add owner user@example.comRoles: owner, writer, reader, freebusy.
DevicesList Chrome devicesgam print cros fields serialnumber,status,lastsync,ouEssential for Chromebook fleet audits and AUE planning.
DevicesMove a Chromebook OUgam update cros <deviceId> ou "/Devices/Carts"Combine with gam csv for bulk moves.
DevicesList mobile devicesgam print mobileUse gam update mobile <id> action account_wipe for BYOD offboarding.
ReportsLogin auditgam report login user allAdd start 2026-08-01 to bound the range.
ReportsAdmin activity auditgam report adminWho changed what in the Admin console — the first place to look after an unexpected change.
ReportsDrive activitygam report driveUseful for investigating suspected data exfiltration.
ReportsLicence assignmentgam print licensesReconcile against active users before a renewal.
BulkCSV loopgam csv users.csv gam update user ~primaryEmail org "/Staff"~column substitutes a CSV field. The single most useful GAM pattern.
BulkBatch filegam batch commands.txtOne GAM command per line; runs them in sequence.
BulkRedirect output to CSVgam redirect csv ./out.csv print usersCleaner than shell redirection — handles headers correctly.
BulkAct on all usersgam all users show filtersall users and ou "/Path" are powerful selectors — and dangerous with a destructive verb.
GAM safety rules
  • GAM has no undo and no confirmation prompt. gam all users delete ... will do exactly what you asked, immediately.
  • Test destructive commands on a single throwaway account first. Every time, not just the first time.
  • Use print to preview what a selector matches before running an action against it.
  • The credential files are super-admin equivalent. Never commit them, never share them, chmod 600 them.
  • Run GAM from a controlled admin workstation, not a shared machine.
  • GAM actions appear in the admin audit log attributed to the authorising account — which is good for accountability and a reason to use a dedicated admin identity.

100 things a Workspace admin actually does

Organised by the job you're trying to do rather than by console menu. Search to filter. Items marked GAM have a command-line equivalent in the GAM tab.

Showing results
Area Tip Why / how
UsersSuspend, don't deleteSuspension is instant and fully reversible. Deletion starts a 20-day clock and complicates data transfer.
UsersSet the OU at creationSaves a second pass and ensures the user never briefly sits under permissive root-level policy.
UsersAgree a username convention earlyMixed conventions break automation and directory lookups forever. Decide once, document it.
UsersAliases are freeUp to 30 per user, no licence cost. Use them for role addresses instead of extra accounts.
UsersBulk-update via CSVDirectory → Users → Bulk update. Handles hundreds of edits without scripting.
UsersFill in manager and departmentDrives org charts, dynamic groups, and offboarding automation. Empty fields cost you later.
UsersUse custom user fieldsEmployee ID, start date, cost centre — queryable via GAM and useful for reconciliation with HR.
UsersNever reuse an email address quicklyA new person inherits calendar invites, shared file access, and mailing lists aimed at the old one.
UsersRecover a deleted user within 20 daysDirectory → Users → Deleted users. After that window it's genuinely unrecoverable.
UsersSend credentials out of bandNever email a temporary password to the same personal address used as the recovery address.
OUsOUs for policy, groups for accessThe single most important structural rule. Conflating them produces unmaintainable permissions.
OUsKeep the root OU restrictiveEverything inherits from root. Default-deny at the top and relax per child OU.
OUsCreate a Suspended OUPark offboarded users there with all services disabled — prevents accidental reactivation with full access.
OUsSeparate contractorsTighter external sharing, no Takeout, restricted Marketplace. Different risk profile, different OU.
OUsGive service accounts their own OUNon-human accounts need different 2SV and session policies. Isolating them avoids awkward exceptions.
OUsDon't nest more than 3–4 deepDeep hierarchies make inherited-setting debugging painful. Flatter is easier to reason about.
OUsTest policy on a pilot OUMove two willing users into a test OU before rolling a setting domain-wide.
OUsExpect propagation delaySetting changes can take up to 24 hours, though usually minutes. Don't chase a bug that's just latency.
GroupsUse groups for Drive sharingShare to a group, not individuals. Access then follows group membership automatically.
GroupsSecurity groups for permissionsMarking a group as a security group allows finer-grained access control and admin role assignment.
GroupsLock down who can post externallyDefault group settings often allow external posting. Review this on every group that receives mail.
GroupsAudit groups with no ownerOwnerless groups drift. Assign at least two owners to anything business-critical.
GroupsUse collaborative inboxes carefullyGood for shared support queues, but assignment features are basic — a real helpdesk tool may fit better.
GroupsExport membership before bulk changesGAM There's no undo for a mass membership removal.
GroupsDynamic groups where availableMembership driven by directory attributes (department, location) maintains itself.
SecurityEnforce 2SV on admins firstNon-negotiable. An unprotected super-admin account is the whole tenant.
SecurityKeep 2+ super admins, but fewOne is a single point of failure; ten is an attack surface. Two or three is usually right.
SecurityUse a break-glass admin accountDedicated, hardware-key protected, not used daily, credentials stored offline.
SecurityAdmins should have a separate daily accountDon't browse the web and read mail as a super admin. Separate identity for privileged work.
SecurityPrefer hardware security keysThe only 2SV factor genuinely resistant to phishing. SMS is the weakest option.
SecurityRestrict OAuth app accessSecurity → API controls → trusted apps only. Unrestricted OAuth is a quiet data-exfiltration path.
SecurityReview third-party app access quarterlyApps accumulate. Check what has Drive or Gmail scopes and revoke what's unused.
SecurityWatch for unauthorised mail forwardingGAM Auto-forward rules to external addresses are a classic compromise indicator.
SecurityDisable less-secure app accessLegacy protocols bypass 2SV. Turn them off unless a specific system genuinely requires them.
SecurityConfigure the Alert Centre recipientsAlerts nobody receives are worthless. Route them to a monitored address or ticket queue.
SecurityTurn on Google's advanced phishing protectionsGmail settings include extra spoofing and attachment protections that aren't all on by default.
SecurityEnrol high-risk users in Advanced ProtectionExecutives and finance staff. Enforces security keys and restricts app access aggressively.
SecuritySet session length for adminsShorter re-auth windows on privileged accounts limit the value of a stolen session.
SecurityUse Context-Aware Access if licensedGate access by device posture, IP, or geography — Workspace's conditional access equivalent.
SecurityCheck the security health pageSecurity → Security centre → Health surfaces misconfigurations against Google's recommendations.
SecurityDelegate admin roles, don't hand out super adminHelp desk staff need user-management rights, not the whole tenant. Custom roles are granular.
GmailSet up SPF, DKIM, and DMARCAll three. Without them your domain is trivially spoofable and your mail lands in spam.
GmailStart DMARC at p=noneCollect reports first, fix legitimate senders, then move to quarantine and reject. Jumping straight to reject breaks mail.
GmailRouting rules are orderedThey evaluate top-down per OU. Unexpected delivery is almost always rule ordering.
GmailUse the Email Log SearchReporting → Email log search traces exactly what happened to a specific message. First stop for "they never got it".
GmailSet attachment compliance rulesBlock executables and password-protected archives inbound rather than relying on user judgement.
GmailAdd an external-sender bannerA visible warning on external mail is one of the cheapest anti-phishing controls available.
GmailConfigure a catch-all carefully — or not at allCatch-alls attract spam and hide typos that should bounce. Usually better left off.
GmailUse delegation instead of shared passwordsNever share mailbox credentials. Delegation gives access with attribution and is revocable.
GmailDeploy signatures centrallyGAM A templated signature applied via CSV loop beats asking 200 people to update theirs.
GmailUnderstand the 25 MB attachment limitLarger files auto-convert to Drive links — and recipients need permission to that file.
GmailKnow the sending limitsRoughly 2,000 external recipients per day for Workspace accounts. Bulk mail belongs in a real platform.
DriveShared drives for team content, alwaysFiles in My Drive leave with the person. Shared drive content is owned by the team and survives departures.
DriveAudit shared drives with a single managerIf that person leaves, the drive becomes unmanageable. Require two managers minimum.
DriveSet external sharing per OUStaff and contractors rarely need the same sharing rights.
DriveDefault link sharing to restricted"Anyone with the link" as a default is how documents end up indexed publicly.
DriveAudit publicly-shared filesGAM Query for anyoneWithLink visibility across the domain periodically.
DriveUse target audiencesChanges the default sharing suggestion from "anyone" to a defined internal audience.
DriveControl Takeout per OUUsers exporting their entire Drive on their last day is a real data-loss vector. Disable for contractors.
DriveStorage is pooled, not per-userOn most editions. One user hoarding video affects everyone's headroom.
DriveGoogle-format files don't count toward quotaDocs/Sheets/Slides created in Drive are free; uploaded Office files and media are not.
DriveVersion history works on uploads tooRight-click → Manage versions on a PDF or ZIP, not just Google formats.
DevicesKnow account wipe vs device wipeAccount wipe removes corporate data only. Device wipe factory-resets. Never confuse them on BYOD.
DevicesRequire device approvalPrevents unknown devices syncing corporate mail the moment someone adds the account.
DevicesBasic management is free and better than nothingEven without advanced management you get inventory and remote account wipe.
DevicesChromebook enrollment is stickyPowerwash doesn't un-enroll a managed Chromebook — it returns to the enrollment screen still bound to your domain.
DevicesEnroll Chromebooks before first sign-inIf a user signs in first you must Powerwash and start over. Ctrl+Alt+E at the sign-in screen.
DevicesTrack Chromebook AUE datesAfter Auto Update Expiration there are no more security updates. Plan refresh around it.
DevicesWorkspace device management isn't full MDMFine for account protection; not a substitute for Intune/Jamf on managed laptops.
AuditAdmin audit log first, alwaysWhen a setting changed unexpectedly, this tells you who and when.
AuditLogin audit reveals impossible travelTwo sign-ins from distant countries minutes apart is a compromise indicator.
AuditDrive audit for exfiltration investigationsShows mass downloads and sharing changes — the standard leaver investigation.
AuditToken audit shows OAuth grantsWhat third-party apps a user authorised, and with what scopes.
AuditLogs have a retention limitExport what you need for long-term compliance rather than assuming it stays forever.
AuditSet up custom alertsAlert on admin privilege grants and suspicious login patterns rather than reviewing logs manually.
AuditExport logs to BigQueryHigher editions can stream audit data to BigQuery for real long-term analysis.
VaultRetention rules and holds are different thingsRetention deletes on schedule; a hold preserves indefinitely and overrides deletion.
VaultA hold survives account deletionThis is exactly why you place holds before offboarding anyone with litigation risk.
VaultDefault retention deletes data permanentlySetting an aggressive org-wide retention rule will destroy data on schedule. Model it before enabling.
VaultVault access is separately privilegedBeing a super admin doesn't grant Vault rights by default — and shouldn't.
VaultArchived User licences retain data cheaplyKeeps a leaver's data Vault-searchable without paying for a full seat.
LicensingAudit licences before renewalGAM Suspended-but-licensed accounts are pure waste. Reconcile against active users.
LicensingUse automatic licensing carefullyConvenient, but it silently assigns paid seats to every new account including test ones.
LicensingGroups don't need licencesA shared address doesn't have to be a user account. Use a group and save the seat.
LicensingEditions differ substantiallyVault, Context-Aware Access, and DLP are edition-gated. Check before promising a feature.
TroubleshootCheck the Workspace Status Dashboard firstBefore deep-diving a "Gmail is broken" ticket, confirm it isn't a Google-side incident.
TroubleshootReproduce in an incognito windowRules out extensions and multi-account sign-in, which cause a surprising share of reported faults.
TroubleshootMulti-account sign-in causes chaosPersonal and work accounts in one browser profile produce permission errors that look like bugs.
TroubleshootConfirm which OU the user is in"Works for me, not them" is usually a per-OU policy difference.
TroubleshootAllow for propagation delayChanges can take up to 24 hours. Don't stack three more changes while waiting.
TroubleshootUse Email Log Search for delivery issuesDefinitive answer on whether a message arrived, was rejected, or was filtered.
TroubleshootCheck the Alert Centre during incidentsOften already tells you what happened before anyone raises a ticket.
TroubleshootContact support with a case ID earlyPaid editions include support. Open the case while investigating rather than after exhausting yourself.
GAMPreview with print before actingSee exactly what a selector matches before running a destructive verb against it.
GAMMaster gam csvThe single highest-leverage GAM pattern — bulk anything from a spreadsheet.
GAMTreat oauth2.txt as a root keyIt grants full tenant control. Never commit, never share, chmod 600.
GAMGAM has no undoNo confirmation prompt either. Test on a throwaway account every time.
GAMScript offboarding, don't freestyle itA reviewed script does the steps in the right order every time, under time pressure.
GAMRedirect output to CSVgam redirect csv ./out.csv print users handles headers correctly.
GAMKeep GAM updatedGoogle's APIs change. An old GAM fails in confusing ways against new behaviour.
ProcessDocument the leaver policyHow long data is retained and who deletes it. Without this, accounts accumulate indefinitely.
ProcessReconcile with HR monthlyActive accounts for people who left months ago is both a cost and a security problem.
ProcessKeep a change logThe audit log tells you what changed; your notes tell you why. Future you needs both.
ProcessTest settings on yourself firstPut your own account in the pilot OU. You'll notice breakage faster than a ticket will surface it.
ProcessSubscribe to the Workspace release notesGoogle ships changes continuously. Reading these prevents being surprised by your own tenant.
ProcessNever test in production on a FridayPropagation delays mean you may not see the damage until Monday, with nobody around.

A security baseline worth implementing in order

These are ordered by impact-per-effort. If you do nothing else, do the first four — they close the paths attackers actually use against Workspace tenants.

Protect the admin accounts
  • Enforce 2SV on all admins, ideally hardware security keys. Phishing-resistant factors are the only ones that stop a determined attacker.
  • Keep two or three super admins, no more. Every additional one is another full-tenant compromise path.
  • Maintain a break-glass account: dedicated, hardware-key protected, not used day to day, credentials stored offline and tested periodically.
  • Admins should have a separate everyday account. Don't read mail and browse the web as a super admin.
  • Delegate scoped admin roles for help desk work instead of handing out super admin.
Close the OAuth and legacy-protocol gaps
  • Security → API controls → restrict to trusted apps only. Unrestricted third-party OAuth access is a quiet, fully-authorised data-exfiltration path that bypasses everything else.
  • Review connected apps quarterly and revoke anything unused or unrecognised.
  • Disable less-secure app access and legacy IMAP/POP where possible — these bypass 2SV entirely.
  • Watch for OAuth grants with broad Gmail or Drive scopes appearing suddenly across multiple users. That pattern is a phishing campaign, not coincidence.
Authenticate your outbound mail
  • SPF, DKIM, and DMARC — all three. Without them your domain can be spoofed trivially and your legitimate mail lands in spam.
  • Start DMARC at p=none with reporting, identify every legitimate sender, then escalate to quarantine and finally reject.
  • Going straight to p=reject will break mail from systems you'd forgotten send as your domain — invoicing, marketing, monitoring.
  • Add an external-sender banner. Cheap, and it measurably reduces successful phishing.
Control data leaving the organisation
  • Set Drive external sharing per OU — contractors and staff rarely warrant the same rights.
  • Default link sharing to restricted, not "anyone with the link".
  • Audit for publicly-shared files periodically. It's a one-line GAM query and it always finds something.
  • Consider disabling Takeout for OUs that have no legitimate need — mass self-export on someone's last day is a real pattern.
  • Use DLP rules (higher editions) to flag or block sharing of content matching sensitive patterns.
Monitor and be able to investigate
  • Route Alert Centre notifications to a monitored address or ticket queue. Alerts nobody reads provide assurance without safety.
  • Know the four logs that matter: admin (who changed what), login (impossible travel, failed attempts), Drive (mass download or sharing changes), and token (OAuth grants).
  • Set custom alerts on high-signal events — admin privilege grants especially.
  • Understand your log retention limit and export beyond it if you have compliance obligations.

Responding to a compromised account

Contain first, investigate second

The instinct to work out what happened before acting is wrong here. Every minute of retained access is more damage. Cut access, then investigate — the logs will still be there.

1

Suspend and terminate sessions

Suspension blocks new sign-ins, but existing session cookies and OAuth tokens can survive it. Do all three.

gam update user victim@example.com suspended on gam user victim@example.com signout gam user victim@example.com deprovision
2

Check for persistence mechanisms

Attackers establish persistence so regaining access survives a password reset. The common ones, in order of frequency:

gam user victim@example.com show filters # auto-forward / auto-delete rules gam user victim@example.com show forwards # mailbox forwarding gam user victim@example.com show delegates # added delegate access gam user victim@example.com show tokens # rogue OAuth grants

Auto-forwarding rules and added delegates are the classic ones. A rule that forwards then deletes matching mail is designed to hide invoice-fraud replies from the real owner.

3

Determine the blast radius

Login audit for source IPs and times. Drive audit for mass downloads or sharing changes. Admin audit if the account held any privileges. Check whether the same OAuth grant appears on other users — phishing campaigns rarely target one person.

4

Recover deliberately

New password, re-enroll 2SV from scratch (assume backup codes are compromised), remove every rogue filter/forward/delegate found in step 2, then restore access. Verify with the user that the mailbox looks right.

5

Close the path that was used

If it was phishing, the fix is 2SV enforcement and better factors, not just a lecture. If it was OAuth, restrict app access. An incident that doesn't change a control will recur.

GAM and automation

Official documentation

Related cheatsheets