List of Users accessing Gmail through POP/IMAP

797 views
Skip to first unread message

Himanshu Jaiswal

unread,
Dec 4, 2017, 2:38:28 AM12/4/17
to GAM for G Suite
Hello,

Is there any way to list all the users accessing Gmail through POP/IMAP on Email Clients

Ross Scroggs

unread,
Dec 4, 2017, 9:10:51 AM12/4/17
to google-ap...@googlegroups.com
You can find out who has POP/IMAP enabled; this doesn't tell you that they are actually using the protocol.

gam all users show pop > PopUsers.txt
gam all users show imap > ImapUsers.txt

On Dec 3, 2017, at 11:31 PM, 'Himanshu Jaiswal' via GAM for G Suite <google-ap...@googlegroups.com> wrote:

Hello,

Is there any way to list all the users accessing Gmail through POP/IMAP on Email Clients

--
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 post to this group, send email to google-ap...@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/0ce549a6-f6c0-4e50-9ae7-acb26443ba78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Himanshu Jaiswal

unread,
Dec 4, 2017, 9:20:14 AM12/4/17
to GAM for G Suite
Thank you Ross

On Monday, December 4, 2017 at 7:40:51 PM UTC+5:30, Ross Scroggs wrote:
You can find out who has POP/IMAP enabled; this doesn't tell you that they are actually using the protocol.

gam all users show pop > PopUsers.txt
gam all users show imap > ImapUsers.txt

On Dec 3, 2017, at 11:31 PM, 'Himanshu Jaiswal' via GAM for G Suite <google-ap...@googlegroups.com> wrote:

Hello,

Is there any way to list all the users accessing Gmail through POP/IMAP on Email Clients

--
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.

Ross Scroggs

unread,
Dec 4, 2017, 9:28:38 AM12/4/17
to google-ap...@googlegroups.com
Here is the data you actually want.

gam report users parameters gmail:last_pop_time,gmail:last_imap_time > PopImapAccess.csv

On Dec 3, 2017, at 11:31 PM, 'Himanshu Jaiswal' via GAM for G Suite <google-ap...@googlegroups.com> wrote:

Hello,

Is there any way to list all the users accessing Gmail through POP/IMAP on Email Clients

--
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.

Himanshu Jaiswal

unread,
Dec 6, 2017, 7:59:49 AM12/6/17
to GAM for G Suite
Hi Ross,

Thanks for the command. Can we achieve the same kind of result using print command like

gam print users parameters gmail:last_pop_time,gmail:last_imap_time > PopImapAccess.csv


On Monday, December 4, 2017 at 7:58:38 PM UTC+5:30, Ross Scroggs wrote:
Here is the data you actually want.

gam report users parameters gmail:last_pop_time,gmail:last_imap_time > PopImapAccess.csv

On Dec 3, 2017, at 11:31 PM, 'Himanshu Jaiswal' via GAM for G Suite <google-ap...@googlegroups.com> wrote:

Hello,

Is there any way to list all the users accessing Gmail through POP/IMAP on Email Clients

--
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.

Ross Scroggs

unread,
Dec 6, 2017, 8:16:40 AM12/6/17
to google-ap...@googlegroups.com
No, that data is only available through the report users command.

To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.

To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

Himanshu Jaiswal

unread,
Dec 6, 2017, 8:18:14 AM12/6/17
to GAM for G Suite
Thank you Ross.

Himanshu Jaiswal

unread,
Dec 6, 2017, 8:33:47 AM12/6/17
to GAM for G Suite
Hello Ross,

When I give the following command I get error as ERROR: isEnrolledIn2Sv is not a valid argument for "gam print users"

gam print users givenName familyName fullName primaryEmail isEnrolledIn2Sv lastLoginTime suspended > UserReport.csv

But I can see the argument isEnrolledIn2Sv is correct from https://developers.google.com/admin-sdk/directory/v1/guides/search-users page.

Ross Scroggs

unread,
Dec 6, 2017, 8:45:18 AM12/6/17
to google-ap...@googlegroups.com
Gam uses an alternate spellings: is2svenrolled is2svenforced
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.

To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

Jinglan Yao

unread,
Mar 5, 2024, 11:00:30 AM3/5/24
to GAM for Google Workspace
Hi all,

Sorry to revive a super old thread but I have a question related to this report. Let me know if you'd rather this move to a new thread.

When I run:
gam user <user> show imap

I get:
User: user@domain, IMAP Enabled: False, autoExpunge: True, expungeBehavior: archive, maxFolderSize: 0

But when I run:
gam redirect csv ./GmailUsage.csv report user parameters gmail:timestamp_last_imap

My report shows that almost every user has had IMAP access in the last couple of weeks.

How can that be? What am I missing?

Thanks!

Maj Marshall Giguere

unread,
Mar 5, 2024, 12:39:38 PM3/5/24
to google-ap...@googlegroups.com
Jinglan;

The first command is simply showing you the user IMAP settings, not usage.  The second command is looking at the logs to tell you when a user last had an IMAP transaction.  The two are completely different queries.


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.

Jinglan Yao

unread,
Mar 5, 2024, 1:03:27 PM3/5/24
to GAM for Google Workspace
Thanks for the reply Maj. I think my confusion is a misunderstanding perhaps on my part. I assumed that if IMAP was disabled, then there could not be IMAP access. That's why these two results are confusing me. 

Can you help me understand how we can have IMAP transactions with IMAP turned off?

Thanks!

Jay Lee

unread,
Mar 5, 2024, 1:06:28 PM3/5/24
to google-ap...@googlegroups.com
If the admin console setting is turned off, users can't access IMAP.

The user setting in Gmail though only controls username/password IMAP authentication, users can still use IMAP and OAuth authentication (assuming admin setting is on).

Jay

Jinglan Yao

unread,
Mar 5, 2024, 1:28:12 PM3/5/24
to GAM for Google Workspace
Thanks for the clarification, Jay. That makes sense that the setting I'm seeing as set to "False" is only for email+password IMAP authentication, which I thought was all but deprecated these days.

The reason for my inquiry is surrounding employee departures. I was looking for a quick way to stop all IMAP access using GAM for a specific user. What's the best way to do this?

Thanks!

Jay Lee

unread,
Mar 5, 2024, 1:31:10 PM3/5/24
to google-ap...@googlegroups.com
The quickest method is to disable / archive the user but that also causes mail to bounce.

You could also reset user password, revoke all OAuth app tokens and revoke all ASPs.



Jay

Jay Lee


Reply all
Reply to author
Forward
0 new messages