Introduction
In this article, we will learn about how to List Users with Email Aliases in Google Workspace. In a growing organization using Google Workspace, managing users and their associated email addresses becomes critical to maintaining communication efficiency and IT governance. Many users have multiple aliases—alternate email addresses that route to their primary account. These aliases are often used for role-based emails (e.g., support@, hr@), department tagging, or privacy reasons.
However, the Google Admin Console does not provide a direct way to list all aliases across users, making manual tracking time-consuming and error-prone.
This guide shows you how to find email aliases in Google Workspace, create a comprehensive list of all email addresses per user using Apps Script, and automate the process using xFanatical Foresight—our powerful workflow automation platform tailored for Workspace admins.
What Are Email Aliases and Why Are They Used?
An email alias is an alternative email address that forwards mail to a user's primary inbox. For example, [email protected]
might also receive emails sent to [email protected]
. Common use cases include:
- Team or department-based aliases
- Temporary campaign-specific emails
- Public-facing support or marketing addresses
- Privacy masking
Being able to list all email aliases in Google Workspace helps ensure transparency, security, and better email routing.
The Problem
Google Workspace administrators can create email aliases for a user so they can send and receive email from another address at your domain. As an administrator, sometimes, you need to find out users that have email aliases in their account information. Unfortunately, Google Admin interface is clunky for this task as email aliases are hidden in each user's profile page. That's mission impossible if you have hundreds of users in your directory.
Step-by-Step: How to List Users with Email Aliases via Google Apps Script
The following open source Google Apps Script can help you find out all users that have email aliases.
Instructions
- Open https://script.google.com.
- Click New project.
- Name the script project in the title
- Copy and paste the following script to the script editor, overwriting existing
function myFunction() {}
code - Click Services in the left navigation panel
- Select Admin SDK API
- Click Add
- Click
in the toolbar
- Click Run
- It will ask for your permissions in the first run
- After you grant the permission, the script shall run and print out the results in the Execution log.
Source code
/** * list users that have email aliases * Usage: * 1. copy and paste this source code to your Apps Script Editor * 2. select the following function name * 3. click 'Run'. * 4. The users with email aliases will be printed in the 'Execution log' * * © 2021 xFanatical, Inc. * @license MIT * @version 1.0.2 fix a pagination issue * @version 1.0.1 print out aliases * @version 1.0.0 proof of concept */ function listUsersWithEmailAliases() { let pageToken let page do { page = AdminDirectory.Users.list({ customer: 'my_customer', maxResults: 100, pageToken, fields: 'users(name/fullName,primaryEmail,aliases),nextPageToken', }) let users = page.users if (users) { for (let i = 0; i < users.length; i++) { const user = users[i] if (user.aliases && user.aliases.length > 0) { Logger.log(`User ${user.name.fullName} <${user.primaryEmail}> ` + `has ${user.aliases.length} email alias${user.aliases.length > 1 ? 'es' : ''}: ` + JSON.stringify(user.aliases)) } } } else { Logger.log('No users found.') } pageToken = page.nextPageToken } while (pageToken) }
Automate Alias Reporting with xFanatical Foresight
For large domains or recurring reporting needs, manually running scripts isn’t scalable. That’s where xFanatical Foresight helps. With our no-code automation tool, Workspace admins can:
- List all users and their aliases on a scheduled basis
- Export alias data to Google Sheets or email
- Filter by user status (active/suspended)
- Auto-notify IT teams or stakeholders on changes
If you're interested in extending functions or automating your tasks as much as possible on Google Workspace, please check out our code-free workflow automation software Foresight. We also provide custom apps script development services to increase your productivity. Please don't hesitate to contact us. It's our passion and expertise to assist you on Google Workspace.
Why Alias Visibility Matters for Security and Compliance
- Prevent misuse: Ensure inactive or former employees don't retain live aliases.
- Avoid email spoofing: Monitor all external-facing aliases.
- Audit readiness: Maintain up-to-date documentation of all user emails for IT audits..
Conclusion
Email alias sprawl can go unnoticed until it becomes a risk. Whether you're managing a small team or a 5,000-user domain, it's crucial to know every address linked to each user.
Using the methods above, you can easily find aliases in Google Workspace, generate a list of all email addresses, and gain full visibility. For ongoing automation, xFanatical Foresight empowers you to create workflows that run independently, ensuring alias data is always accurate and accessible.
Start automating with a 14 days free trial of xFanatical Foresight and bring peace of mind to your Workspace admin tasks.