Bulk entry for creating alias and sendas using alias email address

499 views
Skip to first unread message

Seelan

unread,
Aug 9, 2021, 6:48:24 AM8/9/21
to GAM for Google Workspace
Hi,

I want to create bulk alias for users within my domain and then I want to assign that alias email address as their default sendas email address.

Please share the GAM command or script for this.

Thanks

Ross Scroggs

unread,
Aug 9, 2021, 9:17:35 AM8/9/21
to google-ap...@googlegroups.com
Here is the Advanced GAM documentation, the commands are the same for StandardGAM.

Create a CSV file (UserAlias.csv) with three columns:
primaryEmail,Alias,AliasName

Create the aliases
gam csv UserAliaas.csv gam create alias "~Alias" user "~primaryEmail"

Set alias as primary sendas
gam csv UserAlias.csv gam user "~primaryEmail" create sendas "~Alias" "~AliasName" default

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/6e2ab2ca-2d17-4531-8398-1e27420747c4n%40googlegroups.com.

Seelan

unread,
Aug 9, 2021, 10:03:14 AM8/9/21
to GAM for Google Workspace
Thank you Ross,

When I run the command I am getting 
ERROR: 403: Not Authorized to access this resource/api - forbidden

Any ideas why?

Ross Scroggs

unread,
Aug 9, 2021, 11:09:06 AM8/9/21
to google-ap...@googlegroups.com
Seelan,

Email me directly.

Ross



--

Rick Davis GLSD

unread,
Nov 12, 2024, 9:01:33 AM11/12/24
to GAM for Google Workspace
As a side note or question to a discussion from MacAdmins Slack channel #google-workspace where I am still working on understanding the intent and expected usage of a user alias or secondary domain … a 7 character domain as opposed to a 32 character domain … I think I have learned that the districts plan to allow teachers and students to sign in to ChromeOS and Chrome web browser with the 7 character secondary domain alias and retain access to the primary domain account files, etc., is not supported. Either way I am sure I will have the need to create an alias for many or all domain users. 

What will be my best path forward for creating the aliases? Using a csv file created from the primary domain OU’s with this command gam csv ALIAS_ADD.CSV gam create alias "~alias" user "~user"

Or would there be a query I could run to create an alias for all users in OU’s and children or specific OU’s?

What would be my future workflow to insure that all new accounts in the primary domain also have an alias in the secondary domain?

Rick

Rick Davis GLSD

unread,
Nov 13, 2024, 8:27:53 AM11/13/24
to GAM for Google Workspace
Add-on question. I believe the intent is to allow the users to sign in to Chrome and ChromeOS devices with the shorter domain name. Which means once I have the workflow in place to add the secondary domain as an alias. I will then need to set that alias as their primary email address. Which I can do manually in the Google Admin Console and so far my limited testing as been successful.

So my add-on question would be is there a GAM method for changing a users primary email address to an existing alias?

Rick 

✉ Kevin Melillo

unread,
Nov 13, 2024, 9:58:22 AM11/13/24
to google-ap...@googlegroups.com
gam update user <original email> username <alias email>
This will update their primary email address to the alias address, and at the same time set the original email as an alias.

Rick Davis

unread,
Nov 13, 2024, 11:46:40 AM11/13/24
to google-ap...@googlegroups.com
Excellent. Thank you. This will help, I am sure I can feed it a csv file to change users in bulk.

Have a wonderful day.

Rick

You received this message because you are subscribed to a topic in the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/q8MR2GlKV2c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-apps-manager/CAKM%3DboaKSG6xHSSxg0aageWgOg80m%3DV%2BPHD0LWRYELfsEii1sw%40mail.gmail.com.


--

Reply all
Reply to author
Forward
0 new messages