GAM -- Alias for secondary domains

870 views
Skip to first unread message

Matt Foley

unread,
Aug 2, 2022, 11:11:15 AM8/2/22
to GAM for Google Workspace
Hello,

Does anyone know if gam is capable of setting an Alias for all staff members and groups for a secondary domain?    And then if we can use Gam to set a Send as email for staff? 

We are looking at creating an alias domain or as a secondary domain.  -- Alias domain being more restricted but quicker to implement. 


Jay Lee

unread,
Aug 2, 2022, 11:18:05 AM8/2/22
to google-ap...@googlegroups.com

--
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/7aba99ad-8f7f-4f3d-acc2-8b79e87ee849n%40googlegroups.com.

Matt Foley

unread,
Aug 2, 2022, 12:18:20 PM8/2/22
to google-ap...@googlegroups.com
Jay,

I have primary.com as the primary domain, and secondarydomain.com verified domains with mx records set,

When I run gam create domainalias secondarydomain.com primary.com 

I get a domain already exists error,  I must be mistaken, Does the domainalias command create an alias domain like the GUI? 

Do I need to do each user individually this way with a gam script? 


Jay Lee

unread,
Aug 2, 2022, 12:40:46 PM8/2/22
to google-ap...@googlegroups.com
you can't make a secondary domain an alias domain or vice versa. If you need to change the type of domain from secondary to alias then you needt to delete the secondary domain and re-add as an alias. If you use the super admin account you originally used to verify the domain with you shouldn't need to reverify.

My two cents: unless the domain really is an absolute 1:1 mapping to the other then keep it as a secondary domain. It'll take a bit more scripting to create aliases for the users in the secondary domain but secondary domains are much more powerful/flexible than alias domains.

Jay Lee


--
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.

Matt Foley

unread,
Aug 2, 2022, 1:35:09 PM8/2/22
to google-ap...@googlegroups.com
Yea I ended up doing the domain as a secondary domain and then, using excel  adding primary email for A2 and secondary email B2  ="gam create alias " & B2 & " target " & A2
I just took the list from A2 in a separate sheet and Find and replaced the Primary domain with the one we wanted to be an alias. 

and them pasting that into Gam on windows (it just slow but for my small staff it worked.) 
Not the cleanest but it works -- Hopefully I can get a script made to to take everyone in the staff OU and automatically verify that they have an alias that matches. 

Thanks, 


Reply all
Reply to author
Forward
0 new messages