Assign users to OU based on group membership

156 views
Skip to first unread message

Patrick Haley

unread,
Aug 4, 2022, 1:01:29 PM8/4/22
to GAM for Google Workspace
I see a lot of previous questions about assigning members to Groups based on the Org Unit. But is there a way to add people to an Org Unit based on Group membership?

Ross Scroggs

unread,
Aug 4, 2022, 1:18:22 PM8/4/22
to google-ap...@googlegroups.com
Patrick,

gam update ou "/Path/to/OU" add group gr...@domain.com

Ross

On Thu, Aug 4, 2022 at 10:01 AM 'Patrick Haley' via GAM for Google Workspace <google-ap...@googlegroups.com> wrote:
I see a lot of previous questions about assigning members to Groups based on the Org Unit. But is there a way to add people to an Org Unit based on Group membership?

--
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/006f47d8-b074-4e33-87f6-70dbcce83309n%40googlegroups.com.


--

Kim Nilsson

unread,
Aug 4, 2022, 6:08:24 PM8/4/22
to GAM for Google Workspace
Syntax looks weird, but it works. :-)

So does the much longer, print members and use csv to change their ou.

gam print group-members group students | gam csv - gam update user ~email ou /Students

I'm guessing it's something like that you do in the background, Ross, making the shorter command possible?

/Kim

Patrick Haley

unread,
Aug 5, 2022, 10:20:04 AM8/5/22
to google-ap...@googlegroups.com
Thanks Ross and Kim. Both work great and Ross's solution is the most elegant way to handle this for my use case. Many thanks.

--
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/4C424p9m0_Q/unsubscribe.
To unsubscribe from this group and all its topics, 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/585f59a9-8830-41c3-bae3-831ce31b84b9n%40googlegroups.com.


--
 Patrick Haley
 Head of Global IT & Systems

Reply all
Reply to author
Forward
0 new messages