ChromeBook last user

749 views
Skip to first unread message

RooDavis

unread,
May 19, 2020, 3:02:54 PM5/19/20
to GAM for G Suite
Can I run a gam command to show me the last user to login on a Chromebook?

Ross Scroggs

unread,
May 19, 2020, 3:22:04 PM5/19/20
to google-ap...@googlegroups.com
A specific Chromebook or ChromeBooks in general?

Ross

On Tue, May 19, 2020 at 12:02 PM 'RooDavis' via GAM for G Suite <google-ap...@googlegroups.com> wrote:
Can I run a gam command to show me the last user to login on a Chromebook?

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" 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/cbf6188a-c45a-402b-9bd6-662dc7835920%40googlegroups.com.


--
Message has been deleted

RooDavis

unread,
May 19, 2020, 3:25:13 PM5/19/20
to GAM for G Suite
Hey Ross,

I thought the same thing after I hit post. Chromebooks in general I think. Once i get that I think I can figure out how to do one or more in a list or sort the list in sheets.

RooDavis

unread,
May 19, 2020, 3:30:46 PM5/19/20
to GAM for G Suite
Agreed, I am getting mixed results in gam and the admin console so far. Sometimes I end up with every user that has ever logged into the device.


On Tuesday, May 19, 2020 at 3:02:54 PM UTC-4, RooDavis wrote:

Ross Scroggs

unread,
May 19, 2020, 3:45:42 PM5/19/20
to google-ap...@googlegroups.com
Rhys,

<CrOSFieldName> ::=

        activetimeranges|timeranges|

        annotatedassetid|assetid|asset|

        annotatedlocation|location|

        annotateduser|user|

        autoupdateexpiration|

        bootmode|

        cpustatusreports|

        devicefiles|

        deviceid|

        diskvolumereports|

        dockmacaddress|

        ethernetmacaddress|

        ethernetmacaddress0|

        firmwareversion|

        lastenrollmenttime|

        lastsync|

        macaddress|

        manufacturedate|

        meid|

        model|

        notes|

        ordernumber|

        orgunitpath|org|ou|

        osversion|

        platformversion|

        recentusers|

        serialnumber|

        status|

        supportenddate|

        systemramtotal|

        systemramfreereports|

        tpmversioninfo|

        willautorenew

<CrOSFieldNameList> ::= "<CrOSFieldName>(,<CrOSFieldName>)*"


<CrOSListFieldName> ::=

        activetimeranges|timeranges|

        cpustatusreports|

        devicefiles|

        diskvolumereports|

        recentusers|

        systemramfreereports


Basic GAM

gam info cros <CrOSEntity> [nolists] [listlimit <Number>] [start <Date>] [end <Date>]

        [basic|full|allfields] <CrOSFieldName>* [fields <CrOSFieldNameList>]

        [downloadfile latest|<Time>] [targetfolder <FilePath>]


gam print cros [todrive] [(query <QueryCrOS>)|(queries <QueryCrOSList>)] [limittoou <OrgUnitItem>]

[orderby <CrOSOrderByFieldName> [ascending|descending]]

        [nolists|<CrOSListFieldName>*] [listlimit <Number>] [start <Date>] [end <Date>]

        [basic|full|allfields] <CrOSFieldName>* [fields <CrOSFieldNameList>] [sortheaders]


Advanced GAM

gam info cros <CrOSEntity> [nolists] [listlimit <Number>] [start <Date>] [end <Date>]

        [basic|full|allfields] <CrOSFieldName>* [fields <CrOSFieldNameList>]

[downloadfile latest|<Time>] [targetfolder <FilePath>] [formatjson]

gam print cros [todrive <ToDriveAttribute>*]

[(query <QueryCrOS>)|(queries <QueryCrOSList>)] [limittoou <OrgUnitItem>]

        (querytime.* <Time>)*

        [orderby <CrOSOrderByFieldName> [ascending|descending]]

        [nolists|(<CrOSListFieldName>* [onerow]) [listlimit <Number>] [start <Date>] [end <Date>]

        [basic|full|allfields] <CrOSFieldName>* [fields <CrOSFieldNameList>]

        [sortheaders] [formatjson] [quotechar <Character>]


gam print cros activetimeranges recentusers listlimit 1 fields deviceid,serialnumber,notes,location,ou

gam info cros <DeviceID> activetimeranges recentusers listlimit 1 fields deviceid,serialnumber,notes,location,ou

gam info cros cros_sn <SerialNumber> activetimeranges recentusers listlimit 1 fields deviceid,serialnumber,notes,location,ou


Add/remove fields as desired.


Ross


--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.


--

RooDavis

unread,
May 19, 2020, 9:11:44 PM5/19/20
to GAM for G Suite
Thanks Ross. This worked perfectly. You make it look so easy. You're awesome.


On Tuesday, May 19, 2020 at 3:02:54 PM UTC-4, RooDavis wrote:

+KimNilsson

unread,
May 20, 2020, 9:16:17 AM5/20/20
to GAM for G Suite
Worth noting that the field activetimeranges produces data that is stupidly and illogically in the wrong order!

device.recentUsers[0].email and device.activeTimeRanges[0].date is not in any way connected!

device.recentUsers[0].email is the email of the most recent user, just as you would expect.

device.activeTimeRanges[0].date is not the date from the most recent activity, but some random event some time in the past, with the most recent activity instead in the place of device.activeTimeRanges[X].date, where X is unknown beforehand. Only if you print all active time ranges can you see which is last, and afaik there's no way to pull only the last value! :-(

RooDavis

unread,
May 20, 2020, 4:09:13 PM5/20/20
to GAM for G Suite
Yes unfortunately, while I can now get the information using gam. The data itself is worthless. Times and users don't match up correctly and on a test Chromebook even after a successful sync the latest user information does not appear to be updated.

We have 250+ Chromebooks we sent home and are preparing to request they be returned and wanted to send an email to the last user, but can’t consistently find that data.


On Tuesday, May 19, 2020 at 3:02:54 PM UTC-4, RooDavis wrote:

Ramond B

unread,
May 20, 2020, 4:53:26 PM5/20/20
to GAM for G Suite
Hello RooDavis, my answer is not a GAM solution, but make sure you have this setting in Device management - Chrome - Settings (Device Settings) and make sure "User Data" is set to Do not erase local user data.
Then I would go to Device management - Chrome - Devices and download all of your devices or a certain OU and you will see the last recent user that logged on. 

Kim Nilsson

unread,
May 20, 2020, 5:44:18 PM5/20/20
to Google Apps Manager
RamondB,

there is no difference in the quality of the data in Device Management and what GAM has access to. The data is the same. 

What RooDavis is describing is the fact that a Chromebook is not always reporting new user activity every time it is used, even if it is logged into for quite some time. Especially if it wasn't actually logged into, but only unlocked, after closing the lid without logging out.

That discrepancy is what is causing the three data points to be different, some times a lot different. And on top of that, the activeTimeRanges data is in the wrong order. 😭

Rick Davis GLSD

unread,
Aug 20, 2023, 10:44:27 AM8/20/23
to GAM for Google Workspace
Hi Friends,

I can't remember if my original question was resolved or tagged as waiting on a bug fix. I now have a similar, but different situation. As students return and start signing in I would like to be able to confirm or determine if/when a device was actually used and if possible by whom. Our device asset management system currently shows devices that we “collected” at the end of last school year. I would like to change those devices status to “dispersed” to show that the student received their device at the beginning of this school year. If I could generate a list of devices that have had a login after 8/1/2023, I could then import that list into our asset management software and change the device status. Having the user that logged in to the device would also be great.

Thoughts or suggestions?

Rick

Ross Scroggs

unread,
Aug 20, 2023, 11:05:47 AM8/20/23
to google-ap...@googlegroups.com
Rick,

Try this:
gam redirect csv ./CrosActivity.csv print crosactivity listlimit 1  reverselists timeranges query "status:ACTIVE"

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.

Rick Davis

unread,
Aug 20, 2023, 11:28:42 AM8/20/23
to google-ap...@googlegroups.com
Good Morning Ross,

I am both happy and sad to see that you are active this fine Sunday morning. I think we both should find something better to be doing.

I ran this command and saved the results todrive. The file contains two lines for each device. One line has the data in all fields except for the activeTimeRanges.date, activeTimeRanges.duration and activeTimeRanges.minutes fields. The second line has data in all fields except for the recentUsers.email field.

Rick


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/y08HYu6CWPY/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/B1DC4088-3A41-4BCD-9609-2DF75215DA97%40gmail.com.


--

Ross Scroggs

unread,
Aug 20, 2023, 11:52:32 AM8/20/23
to google-ap...@googlegroups.com
Rick,

I read the Wiki, the documentation says that recentuser and timeranges  will be written to separate rows.
The following just does timeranges but my previous reply with print cros will give you both on one row.

gam redirect csv ./CrosActivity.csv print crosactivity listlimit 1 timeranges reverselists timeranges query "status:ACTIVE" 

Ross
----
Ross Scroggs


Reply all
Reply to author
Forward
0 new messages