Update bulk users to a new domain name

Skip to first unread message

Xavier Rehder

Jun 27, 2022, 9:56:28 PMJun 27
to GAM for Google Workspace
Hey, everyone!

I'm new to GAM and getting the hang of it pretty quickly but I need to update a mass amount of users to a new domain. For example:

All users in OU Soccer have a domain of @soccer.org

I need to change all users in OU Soccer domain to @USAsoccer.org

How would I do this?

Ross Scroggs

Jun 27, 2022, 10:10:21 PMJun 27
to google-ap...@googlegroups.com


$ gam print users query "orgUnitPath='/Soccer'" > SoccerUsers.csv
Edit SoccerUsers.csv 
Copy column A into column B and change the header of column B to newEmail
In column B, change soccer.org to USAsoccer.org
Save the file
$ gam csv SoccerUsers.csv gam update user "~primaryEmail" email "~newEmail"


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/713431ba-7f6f-4e70-bea6-9d40e4b55835n%40googlegroups.com.

Xavier Rehder

Jun 28, 2022, 11:37:40 AMJun 28
to GAM for Google Workspace
This worked! Thanks, Ross! 
Reply all
Reply to author
0 new messages