gam info user & gam print user give different results, if you're unlucky

354 views
Skip to first unread message

Kim Nilsson

unread,
Jan 19, 2021, 11:09:57 AM1/19/21
to GAM for Google Workspace
I know that they are different API calls, and have had this discussion with Ross already, so this is just a post to let everyone else know about this, so it can be found when searching for this phenomenon.

Depending on when you run these two commands, there could absolutely be a difference in results, and they could lag several days.

$ gam info user some...@domain.com | grep -i "last login time"
    Last login time: 2021-01-14T11:52:23+01:00

$ gam print users query "some...@domain.com" fields lastLoginTime
Getting all Users that match query (some...@domain.com), may take some time on a large Google Workspace Account...
primaryEmail,lastLoginTime
some...@domain.com,2020-09-07T17:19:26+02:00

This means that the data pulled comes from two different sources, even though we thing it would be the same.

It can easily be verified by checking the same user in the admin console.

Checking the unique user on the user card, we see the correct new/updated info.
Checking the list of users in the OU on the admin console shows the old incorrect login time.

So print user and info user pulls their data from different places.

Now you know. :-)

On a sidenote, we discovered this problem as there also seemed to be something wrong with the print user data of this particular user, since the user has logged in pretty much every day since that September day, so it was also wildly wrong, and not only lagging.

A couple of days after the discrepancy was discovered, the two data sources were synced.
Reply all
Reply to author
Forward
0 new messages