untuk cek email alias, dapat dicoba dengan memasukkan scipt berikut di https://script.google.com/:
Open Apps Script.
Click New project.
Name the script project in the title.
Delete the existing code example.
Add the below script:
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)
}
Click Services in the left navigation panel
Select Admin SDK API
Click Add
Click Save Google Apps Script project button in the toolbar.
Click Run.
Grant permissions in the first run.
Results will be displayed in the Execution log.
If you receive any error message after executing the script:
Go to the Admin console and navigate to Security > Access and data control > API controls.
Make sure that Trust internal, domain-owned apps is checked.