How to decipher recentUsers from print users

156 views
Skip to first unread message

Creed Cordonier

unread,
Feb 15, 2017, 2:42:24 PM2/15/17
to GAM for G Suite
Hello,

I am trying to use GAM to pull some basic information from our G-Suite. 

Ideally I would be able to get cros serialnumber,macaddress,model, as well as the most recent logged in user. 

How do I decipher which of the many 'recentUsers.x.email' was the most recent to have logged in on the device?

Any advice appreciated. Thank you!

Creed Cordonier

unread,
Feb 15, 2017, 2:43:24 PM2/15/17
to GAM for G Suite
**EDIT: Title should read 'print cros'**

Creed Cordonier

unread,
Feb 15, 2017, 3:52:45 PM2/15/17
to GAM for G Suite
*Edit 2*

To clarify, when I use 'gam print cros fields serialnumber,macaddress,model,recentUsers > "path\file.csv", it will return multiple rows for each recent user.

I would like gam to grab 1 row for each device and include only the most recent user.

Is that possible?

Thank you!


On Wednesday, February 15, 2017 at 1:42:24 PM UTC-6, Creed Cordonier wrote:

Ross Scroggs

unread,
Feb 15, 2017, 4:02:42 PM2/15/17
to google-ap...@googlegroups.com
Creed,

The API documentation says "List of recent device users, in descending order, by last login time."
So: gam print cros fields serialnumber,macaddress,model,recentUsers listlimit 1 > "path\file.csv

The listlimit N argument says to limit the number of entries for recentUsers/activeTimeRanges to N, 1 in your case.

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-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/dd9c064e-32f8-4a91-8312-7cd5e8bb3540%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Creed Cordonier

unread,
Feb 15, 2017, 4:30:30 PM2/15/17
to GAM for G Suite
Thank you... I was looking at gamcommands.txt in the meantime. That makes sense.

Thank you very much!


On Wednesday, February 15, 2017 at 3:02:42 PM UTC-6, Ross Scroggs wrote:
Creed,

The API documentation says "List of recent device users, in descending order, by last login time."
So: gam print cros fields serialnumber,macaddress,model,recentUsers listlimit 1 > "path\file.csv

The listlimit N argument says to limit the number of entries for recentUsers/activeTimeRanges to N, 1 in your case.

Ross
On Wed, Feb 15, 2017 at 12:52 PM, Creed Cordonier <creed.c...@raytownschools.org> wrote:
*Edit 2*

To clarify, when I use 'gam print cros fields serialnumber,macaddress,model,recentUsers > "path\file.csv", it will return multiple rows for each recent user.

I would like gam to grab 1 row for each device and include only the most recent user.

Is that possible?

Thank you!

On Wednesday, February 15, 2017 at 1:42:24 PM UTC-6, Creed Cordonier wrote:
Hello,

I am trying to use GAM to pull some basic information from our G-Suite. 

Ideally I would be able to get cros serialnumber,macaddress,model, as well as the most recent logged in user. 

How do I decipher which of the many 'recentUsers.x.email' was the most recent to have logged in on the device?

Any advice appreciated. Thank you!

--
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-manager+unsub...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.



--
Reply all
Reply to author
Forward
0 new messages