Account activity date

438 views
Skip to first unread message

Angela Wu

unread,
Apr 12, 2024, 3:00:01 PM4/12/24
to GAM for Google Workspace
First time posting to this group. We are working on suspending accounts that being inactive for the past x days. Google report provide a "last sign in" date. But for accounts that are used on devices like cell phones, they can go years without being asked to log in, yet are actively being used. Admin console does provide POP, IMAP last used date, but only for the past 30 days. Is there a better way to get more accurate data for last activity date? Thank you.

Angela

Ian Crew

unread,
Apr 12, 2024, 4:40:18 PM4/12/24
to 'Jordan Tinsley' via GAM for G Suite
What I typically do is:

gam report users date 2024-04-12 nodatechange fields accounts:last_login_time,accounts:last_name,accounts:last_sso_time,drive:timestamp_last_active_usage,gmail:last_access_time,gmail:last_imap_time,gmail:last_pop_time,gmail:last_interaction_time,gmail:last_webmail_time todrive

Then I take the most-recent of those as the last overall activity for the user. (In my case by sucking it into BigQuery and doing some manipulations there, but there are lots of ways to skin that cat.)

I did do some work a little while back to figure out the official explanation of what all of those different fields mean, and put it (along with a link to the documentation page) in the Sheet at https://docs.google.com/spreadsheets/d/1Yh6twNIRz0JlctkRVHsmblVoLIYw3E2LjitkspH3DbM/edit#gid=0

Hope that helps,

Ian 

On Apr 12, 2024, at 11:54 AM, 'Angela Wu' via GAM for Google Workspace <google-ap...@googlegroups.com> wrote:

First time posting to this group. We are working on suspending accounts that being inactive for the past x days. Google report provide a "last sign in" date. But for accounts that are used on devices like cell phones, they can go years without being asked to log in, yet are actively being used. Admin console does provide POP, IMAP last used date, but only for the past 30 days. Is there a better way to get more accurate data for last activity date? Thank you.

Angela

--
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/a847d0d1-5d88-42a0-add3-5fa89b15025bn%40googlegroups.com.

Wu, Angela

unread,
Apr 14, 2024, 1:38:17 PM4/14/24
to google-ap...@googlegroups.com
Ian:

Thank you so much. This is very helpful.

Angela

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/F1BmGdwx_Mo/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/88FCA2C6-A822-49D9-A7E1-60C82404B7D9%40berkeley.edu.

Rosemarie Scanlon

unread,
Apr 30, 2024, 4:10:55 AM4/30/24
to google-ap...@googlegroups.com
This is really helpful Ian. 

When extracting these reports is there a way to specify short date instead of manipulating multiple columns afterwards in Excel? obviously it's a timestamp parameter, is there a date only one?
"gam report users date 2024-04-12 nodatechange fields accounts:last_login_time,accounts:last_name,accounts:last_sso_time,drive:timestamp_last_active_usage,gmail:last_access_time,gmail:last_imap_time,gmail:last_pop_time,gmail:last_interaction_time,gmail:last_webmail_time todrive"

eg. 2021-10-11T11:25:53Z -> 2021-10-11

Thanks, 
Rosemarie

From: 'Wu, Angela' via GAM for Google Workspace <google-ap...@googlegroups.com>
Sent: Sunday 14 April 2024 18:37
To: google-ap...@googlegroups.com <google-ap...@googlegroups.com>
Subject: Re: [GAM] Account activity date
 

[EXTERNAL] This email was sent from outside of UCC.

Ross Scroggs

unread,
Apr 30, 2024, 10:56:02 AM4/30/24
to google-ap...@googlegroups.com
Yes:


Scroll sown to output_timeformat

gam config output_timeformat "%Y-%m-%d" report users date 2024-04-12 nodatechange fields accounts:last_login_time,accounts:last_name,accounts:last_sso_time,drive:timestamp_last_active_usage,gmail:last_access_time,gmail:last_imap_time,gmail:last_pop_time,gmail:last_interaction_time,gmail:last_webmail_time todrive


Ross
----
Ross Scroggs



Rosemarie Scanlon

unread,
May 1, 2024, 4:13:06 AM5/1/24
to google-ap...@googlegroups.com
Thanks Ross, that's very useful. 

Kind Regards,

Rosemarie


Rosemarie Scanlon |Systems Administrator | IT Services | University College Cork | Email: r.sc...@ucc.ie



From: google-ap...@googlegroups.com <google-ap...@googlegroups.com> on behalf of Ross Scroggs <ross.s...@gmail.com>
Sent: Tuesday 30 April 2024 15:55

Patrick Haley

unread,
May 22, 2024, 12:00:36 AM5/22/24
to GAM for Google Workspace
Hey Ian, 

What does specifying the date and the nodatechange parameter in this command do?

Thanks,
Patrick

Ross Scroggs

unread,
May 22, 2024, 11:09:49 AM5/22/24
to google-ap...@googlegroups.com
By default, usage data is only available starting with some date in the recent past, typically 2 to 3 days.
GAM uses a random (not exactly) user to back up the date until data is found. If that user doesn't have
any recent activity, GAM may back up many days until data is found then and then gets data from
that date for all users which will not be current for most users.

Specifying a date and nodatechange gets you the data from the date specified

$ gam report users fields gmail:last_webmail_time date -1d nodatechange

Getting Reports for all users


WARNING: Data for dates later than 2024-05-20 is not yet available. Please check back later

email,date


$ gam report users fields gmail:last_webmail_time date -2d nodatechange

Getting Reports for all users

Got 278 Reports for all users on 2024-05-20...


Ross

----
Ross Scroggs



Patrick Haley

unread,
May 22, 2024, 11:58:08 AM5/22/24
to GAM for Google Workspace
Makes sense thanks Ross
Reply all
Reply to author
Forward
0 new messages