Missing Fields in Print Cros

181 views
Skip to first unread message

tcarter0

unread,
Apr 12, 2021, 10:34:07 PM4/12/21
to GAM for Google Workspace
I have a script that's been working for years, and it's just started failing, yesterday I believe. Maybe it's related to the various issues that Google is having with some services. The 'gam print cros' command is missing some output fields. I hadn't updated GAM in some time, and was running 4.97. My command:

gam print cros nolists fields deviceId,annotatedAssetId,annotatedLocation,annotatedUser,bootMode,ethernetMacAddress,firmwareVersion,lastEnrollmentTime,lastSync,macAddress,meid,model,notes,orderNumber,orgUnitPath,osVersion,serialNumber,status,supportEndDate,willAutoRenew

and it has stopped outputting these fields:
annotatedLocation
ethernetMacAddress
meid
notes
orderNumber
supportEndDate
willAutoRenew

So I tried this command:
gam print cros nolists allfields

and it added a few more to the output, but still missing the ones above. Then I updated GAM to 6.01 and tried this again:
gam print cros nolists allfields

And it's still missing all of those fields.

Is it possible that it's due to the ongoing outages?



tcarter0

unread,
Apr 14, 2021, 11:37:13 AM4/14/21
to GAM for Google Workspace
Sorry to bump this, but we rely on this data being up to date, and we're having issues as a result. Jay or Ross, can you confirm whether you're still getting these fields with 'gam print cros allfields'?

I'm missing these:

annotatedLocation
ethernetMacAddress
meid
notes
orderNumber
supportEndDate
willAutoRenew

I do get these:
deviceId
annotatedAssetId
annotatedUser
autoUpdateExpiration
bootMode
firmwareVersion
lastEnrollmentTime
lastKnownNetwork
lastSync
macAddress
model
orgUnitPath
osVersion
platformVersion
serialNumber
status
systemRamTotal



Ross Scroggs

unread,
Apr 14, 2021, 12:19:11 PM4/14/21
to google-ap...@googlegroups.com
I get these:
annotatedLocation
ethernetMacAddress
notes

I don't get these:
meid
orderNumber
supportEndDate
willAutoRenew

This is a Google issue, talk to them,

Ross



--
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/6a7a9d96-10b9-48c1-8303-f1e381e2a42cn%40googlegroups.com.


--

Jay Lee

unread,
Apr 14, 2021, 12:24:18 PM4/14/21
to google-ap...@googlegroups.com
I'd be curious if you can see those fields when you look at the same device in the admin console.

Jay Lee


Tommy Carter

unread,
Apr 14, 2021, 4:04:31 PM4/14/21
to google-ap...@googlegroups.com
Is there a new 'return the fields I asked for even if the value is null or blank' switch? That's not my whole problem, but it's definitely part of the problem.

I started looking at examples in the UI, and the orderNumber and willAutoRenew fields aren't displayed at all. I don't know that they ever were. The rest of them are displayed, but are empty in many cases, which is expected.

Between the time that I posted earlier today and now, some of the fields have returned, and some others are gone. When I run this command now:

gam print cros nolists allfields > output.csv

I am still missing these:
orderNumber
supportEndDate
willAutoRenew

I now have these that were missing:
annotatedLocation
ethernetMacAddress
meid
notes

I am now missing these that I had yesterday:
autoUpdateExpiration
lastKnownNetwork
platformVersion
systemRamTotal

But if I query for a specific device, like this:

gam print cros query <serialnumber> nolists allfields

I might get a value for lastKnownNetwork, and for some other serials I don't. When I query for an individual device this way, I notice that it only returns fields for which there exist values. If this particular device doesn't have a value for the Location in the UI, I don't get a field output from GAM for annotatedLocation. But when I dump the whole device list (typical), I do get that field (I wasn't getting it yesterday), and it's empty for most devices, which is appropriate.

So one issue is that it apparently doesn't output a field at all for one specific device, if that field for that device has no value. That's the case for annotatedLocation. Most of my devices have no value there, but it has always in the past, and is once again, outputting that field regardless when I dump the whole device list. But if I query one device, and that device doesn't have a value for annotatedLocation, it doesn't return the field at all. I would expect it to return the field with a blank value.

I'm also getting a JSON formatted value for the lastKnownNetwork field (if anything), whereas I'm pretty sure that was just a plain text value in the past. Example:

[{'ipAddress': '192.168.1.59', 'wanIpAddress': '2603:6080:4904:498b:24a2:9910:f659:ad90'}]

The columns not all being returned consistently, and the the JSON format of the lastKnownNetwork field are both problems that I'll have to resolve.

Thanks,
Tommy


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/v2gM2xvfNug/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/CA%2BVVBp-%2BEwe55yhCCEngmnE93K%3Dk2Yu6bMQL_NpqwEhB3Kd2Bw%40mail.gmail.com.

tcarter0

unread,
Apr 14, 2021, 5:28:05 PM4/14/21
to GAM for Google Workspace
I had been importing all of those fields into a SQL table. When I set this up initially, I thought I might make use of most or all of those fields. But I never did make use of more than about half of them, so I just took the easy path and stopped asking for the ones I don't need. The ones that I do really need are successfully exporting at this time, and hopefully that will continue to be the case. If any of the following stop working, I guess I'll have to open a ticket with Google support. 

deviceId
annotatedAssetId
annotatedUser
lastSync
model
orgUnitPath
osVersion
serialNumber
status

So I'm good for now. I wonder if someone changed an API behavior though. I know for sure that up until a couple of days ago, I got every one of those fields, regardless of whether they had values.

Thanks,
Tommy
Reply all
Reply to author
Forward
0 new messages