Gam filter printing users

644 views
Skip to first unread message

Dennis M

unread,
Mar 9, 2022, 5:04:38 PM3/9/22
to GAM for Google Workspace
Hey!

I have a few version of this, and this has been working well for me 

export GAM_CSV_HEADER_FILTER="primaryEmail,name.fullName,isEnrolledIn2Sv,organizations.0.title,relations.0.value,organizations.0.department"

gam print users fullname is2svenrolled organizations relations todrive

But for some reason i cannot figure out how to get is2svenforced and also "status" suspended or active. 

I tried adding is2svenforced to the filter and the print user command. but it comes out without it.

Anyone thoughts? Maybe im missing formating issue or something 

Thanks, Dennis!

Ross Scroggs

unread,
Mar 9, 2022, 5:36:24 PM3/9/22
to google-ap...@googlegroups.com
Dennis,

export GAM_CSV_HEADER_FILTER="primaryEmail,suspended,name.fullName,isEnrolledIn2Sv,isEnforcedIn2Sv,organizations.0.title,relations.0.value,organizations.0.department"

gam print users fields fullname,is2svenrolled,is2svenforced,suspended,organizations,relations todrive



Ross


This message contains information which may be confidential and/or protected by attorney-client privilege.  Unless you are the addressee, you may not use, copy or disclose to anyone this message or any information contained in this message.  If you have received this message in error, please send me an email and delete this message.   Thank you.

--
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/dbc706bd-0dd6-416c-9d74-36b76a42b68an%40googlegroups.com.


--
Message has been deleted

Dennis M

unread,
Mar 9, 2022, 11:06:49 PM3/9/22
to GAM for Google Workspace
Hey Ross,

Thanks again!

I deleted my last message as I have realized that I was running gam ADV-XTD3, I recently updated and zsh profile got messed up.

When I run:

export GAM_CSV_HEADER_FILTER="primaryEmail,name.fullName,isEnrolledIn2Sv,organizations.0.title,relations.0.value,organizations.0.department,isEnforcedIn2Sv,suspended"

gam print users fields fullname,is2svenrolled,organizations,relations,is2svenforced,suspended todrive

I get a Google Sheets file with these headers in this order:

primaryEmail        name.fullName        isEnrolledIn2Sv        isEnforcedIn2Sv        suspended        organizations.0.title        organizations.0.department        relations.0.value                                                                                                                                                

This is enough for me and solves my needs.  I do find it interesting that the order does not change based on how i order them. 

Thanks so much
-Dennis

Ross Scroggs

unread,
Mar 9, 2022, 11:07:10 PM3/9/22
to google-ap...@googlegroups.com
Dennis,

Whaat is your Gam version and platform?

Ross

On Mar 9, 2022, at 7:27 PM, Dennis M <dennis...@cellsignal.com> wrote:

Ross,

As always thank you greatly!  This gave me what I needed and a bit more!

Is there a way to restrict the output to just these header rows:


primaryEmail
name.fullName
isEnrolledIn2Sv
isEnforcedIn2Sv
suspended
organizations.0.department
organizations.0.title
relations.0.value



I thought thats what the "GAM_CSV_HEADER_FILTER" was doing, but i am getting the rest of the organizations and relations info?  

Thanks again!
Dennis
On Wednesday, March 9, 2022 at 5:36:24 PM UTC-5 Ross Scroggs wrote:

Ross Scroggs

unread,
Mar 9, 2022, 11:09:30 PM3/9/22
to google-ap...@googlegroups.com
Dennis,

With Advanced GAM you say:

gam config csv_output_header_filter "primaryEmail,name.fullName,isEnrolledIn2Sv,organizations.0.title,relations.0.value,organizations.0.department,isEnforcedIn2Sv,suspended" print users fields fullname,is2svenrolled,organizations,relations,is2svenforced,suspended todrive

Ross

Dennis M

unread,
Mar 9, 2022, 11:34:36 PM3/9/22
to GAM for Google Workspace

GAM 6.15 - https://git.io/gam - pyinstaller
Jay Lee <jay...@gmail.com>
Python 3.10.2 64-bit final
google-api-python-client 2.36.0
MacOS Monterey 12.2.1 x86_64


AND

GAMADV-XTD3 6.15.23 - https://github.com/taers232c/GAMADV-XTD3 - pyinstaller
Ross Scroggs <ross.s...@gmail.com>
Python 3.10.2 64-bit final
MacOS Monterey 12.2.1 x86_64

I mostly use GAMADV-XTD3 now. But I keep both versions just incase.

Thanks!  I had print users at the end of my command and not print users fields i must have lost that somewhere in my records..

-Dennis

Reply all
Reply to author
Forward
0 new messages