Mastering Inactive User Management

A comprehensive guide to identifying and auditing dormant Google Workspace accounts to save license costs and improve security.

The Hidden Cost of Inactive Users

In large organizations, employee turnover and project changes often leave behind "zombie accounts"—users who are no longer active but still consume expensive Google Workspace licenses (like Enterprise Plus). Beyond the financial impact, these dormant accounts represent a significant security surface area for potential breaches.

Google's Admin Console provides some basic filtering, but for accurate reporting—especially reconciling "Last Login" time across different services—a programmatic approach is best.

How This Solution Works

Our scripts utilize a hybrid approach to ensure 100% accuracy:

  • Admin Directory API: Fetches the master list of all users and their license assignments (SKUs).
  • Admin Reports API: Queries the detailed audit logs for exact login timestamps. This is crucial because the standard "lastLoginTime" field in the Directory API can sometimes be inaccurate or delayed.
  • Spreadsheet Generation: compiles all data into a clean, actionable Google Sheet report.

Available Tools

1. Automated Monthly Audit (180 Days)

Automated Recommended

This "set-it-and-forget-it" solution is perfect for ongoing compliance. It installs a time-driven trigger that runs continuously.

Key Features:

  • Runs automatically every 30 days
  • Checks for 180 days of inactivity
  • Emails a summary report to Admins
Inactive users 180 days - Auto Run.js
⬇️ Download Auto Script

2. On-Demand Audit Tools

Manual Execution

If you prefer to run audits only when needed, or need to audit for a longer period (365 days), use these manual versions. They provide the same deep analysis but only run when you click "Run".

180 User Audit

Standard 6-month inactivity check.

Download 180-Day

365 User Audit

Deep 1-year inactivity check.

Download 365-Day

Implementation Guide

To deploy these scripts, you will need Super Admin access to your Google Workspace environment.

  1. Create a new Google Sheet (sheet.new).
  2. Go to Extensions > Apps Script.
  3. Paste the downloaded code into the editor.
  4. Enable the Admin SDK API and Admin Reports API in the "Services" section.
  5. Update the CONFIG object at the top of the script with your specific License SKU ID (e.g., Google Enterprise Plus).

For a detailed walkthrough on finding your SKU ID and enabling APIs, check out our Setup & FAQ page.