Google Apps Script to manage and report on admin accounts in Google Workspace. The report will be sent as an email.
1. Lists all admin and delegated admin accounts in your Google Workspace domain.
2. Reports accounts that are suspended or have not logged in for the past 90 days.ยด
3. Sends a summary email with details of suspended and inactive admin accounts.
- Admin email addresses
- Assigned admin roles (if applicable)
- Last login date
- Account creation date
- Admin status
- Delegated admin status
- Suspension status
Start by copying this Google Sheet.
- Open the Apps Script editor, click on "Triggers" (clock icon on the left toolbar).
- Add a new trigger for the `listAllAdminsToSheet` function.
- Set it to run daily or weekly depending on your reporting needs.
- Specify the recipient email address in cell A2 of a sheet named "Setup" in the same spreadsheet.