Looks like it's doing some kind of partial match instead of an exact match.
This is not an issue for a gam print domains command, but it might be for a command that has many headers. For example:
jay@cloudshell:~$ gam config csv_output_header_force "s" print users allfields
Getting all Users, may take some time on a large Google Workspace Account...
Got x Users: a@s.com - w@s.com
s,sshPublicKeys,sshPublicKeys.0.expirationTimeUsec,sshPublicKeys.0.fingerprint,sshPublicKeys.0.key,suspended,suspensionReason
,,,,,False,
,,,,,False,
,,,,,False,
,,,,,False,
,,,,,False,
So, the moral of the story might be to use the full header name. 😀
But even if you add the exact header name you want, you may get more than you expected because of the partial matching behaviour on gam commands that output a lot of headers:
I was curious as to how
csv_output_header_force
worked because I could find very little information on it and no examples.According to GAM documentation,
csv_output_header_force
:Let's try it with a simple command to get a sense of what it does:
Adding
csv_output_header_force
should only output the headers that I specify, so:or even
work perfectly, but:
Hmmmm... why is it showing
creationTime
? Let's add a new headerd
and this will become clear:Hmmm...
domainName
is shown now.Again, let's add a new header
v
:And now
verified
is also shown.Looks like it's doing some kind of partial match instead of an exact match.
This is not an issue for a
gam print domains
command, but it might be for a command that has many headers. For example:So, the moral of the story might be to use the full header name. 😀
But even if you add the exact header name you want, you may get more than you expected because of the partial matching behaviour on gam commands that output a lot of headers:
whoCanAdd
partially matcheswhoCanAddReferences
... 😁