need report of a single user account login history

123 views
Skip to first unread message

Michael Swartz

unread,
Aug 24, 2023, 1:48:14 PM8/24/23
to GAM for Google Workspace
Hi,

I am trying to find out how to create a listing of every time a specific user logged into gmail over a period of time, ie.. the last year or if less, for however far back the history is kept.

I see how to get the lastlogintime, but is there a way to get every last login time going back for a period of time?

Thanks for your help.
Michael

Jay Lee

unread,
Aug 24, 2023, 4:05:15 PM8/24/23
to google-ap...@googlegroups.com
You can start with:

gam report login user <email>

note that a user does not "log into Gmail" - they log into their Google account and once logged in access Google services like Gmail, Drive, etc. Users generally stay logged in for up to 14 days but if you have an enterprise SKU you can customize the Google session length.

You can get some idea about account activity within the Gmail service with a command like:

gam report usage user parameters gmail:num_emails_sent,gmail:timestamp_last_interaction start_date -450d user <email>

The specific parameters you can use are defined here:


note that the output may take some understanding to read. each row is telling you that as of the "date" column value, the user last interacted with their mailbox on timestamp_last_interaction date. If the user hadn't interacted for more than 30 days that value will be blank.

Jay Lee


--
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/1df98d4e-a4db-455d-975f-054d7be7a435n%40googlegroups.com.

Michael Swartz

unread,
Aug 24, 2023, 4:55:15 PM8/24/23
to GAM for Google Workspace
Thank you.

I'll work with that.

Michael

Reply all
Reply to author
Forward
0 new messages