I took this one out of the GAM Cheat Sheet and only had to change the path. It seems my path is correct as it's returning emails but what's with no such user or named directory? Isn't that a google default name, "primaryEmail" Where would I find it if other?
David-Neff ~ % gam print users query "orgUnitPath='/Suspended Users/Former Staff' issuspended=false" | gam csv -gam update user ~primaryEmail suspended on
zsh: no such user or named directory: primaryEmail
David-Neff ~ % Getting all Users in Google Workspace account that match query (orgUnitPath='/Suspended Users/Former Staff' issuspended=false) (may take some time on a large account)...
Got 3 Users: char...@Xschool.org - tay...@Xschool.org
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>
BrokenPipeError: [Errno 32] Broken pipe