GAM command to hide directory sharing for one OU?

29 views
Skip to first unread message

Justin York

unread,
May 15, 2026, 10:26:28 AM (3 days ago) May 15
to GAM for Google Workspace
Hi there, I'm trying to hide Directory Sharing for one OU so I can leave it on for everybody else. I am typing:

gam print users query "orgnamehere/userouhere=" | gam csv - gam update user "~primaryEmail" gal off

And I get the error:
User Print Failed: Query (orgnamehere/userouhere=) Invalid

Ross Scroggs

unread,
May 15, 2026, 10:31:40 AM (3 days ago) May 15
to google-ap...@googlegroups.com
Drop the orgnamehere: gam ou "/userouhere" update user gal off

Ross
----
Ross Scroggs



--
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 visit https://groups.google.com/d/msgid/google-apps-manager/0342facf-0cb1-4e16-99d9-2c535768e4acn%40googlegroups.com.

Justin York

unread,
May 15, 2026, 10:47:22 AM (3 days ago) May 15
to GAM for Google Workspace
Thank you very much. Is that the entire command I need? I don't need the " | gam csv" part?

Justin York

unread,
May 15, 2026, 11:01:23 AM (3 days ago) May 15
to GAM for Google Workspace
Hmm, I can still see that students can see other student's contact cards. is there another command in GAM that might be more thorough in stopping student's from viewing other student's email addresses?

On Friday, May 15, 2026 at 10:31:40 AM UTC-4 Ross Scroggs wrote:

Ross Scroggs

unread,
May 15, 2026, 12:14:34 PM (3 days ago) May 15
to google-ap...@googlegroups.com
Correct. Just use the correct OU name.

Ross



--

Ross Scroggs

unread,
May 15, 2026, 1:35:59 PM (3 days ago) May 15
to google-ap...@googlegroups.com
Send me a private Meet/Zoom invitation and we'll investigate.

Ross
----
Ross Scroggs


Reply all
Reply to author
Forward
0 new messages