Report of users who have 2fa disabled

1,314 views
Skip to first unread message

Andrea

unread,
Jun 14, 2021, 5:11:36 AM6/14/21
to GAM for Google Workspace
Dears,
I would use gam to obtain report of all users that have 2fa disabled.
I try this command
gam report users filter "accounts:is_2sv_enrolled==false" todrive
but it doesn't seem to work properly.
The report  contains users who have 2fa active.

Do you have a suggestion please?

Many thanks
Best regards to all
Andrea

Ross Scroggs

unread,
Jun 14, 2021, 9:40:08 AM6/14/21
to google-ap...@googlegroups.com
Andrea,

Try this:
gam report users filter "accounts:is_2sv_enrolled==false" fields "accounts:is_2sv_enrolled" fulldatarequired all todrive

Ross


IMPORTANT:
This is a business and not a personal e-mail, this message and its attachments are confidential and may also be legally privileged.
If you are not the intended recipient, or have received this e-mail in error, please notify immediately the sender and delete this message and all its attachments.

Any unauthorized review, copying, disclosure, dissemination, or distribution of this message and/or its attachments is strictly forbidden.




--
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/238be2be-c5af-449d-ac94-22f478290758n%40googlegroups.com.

Andrea

unread,
Jun 14, 2021, 11:05:41 AM6/14/21
to GAM for Google Workspace
Ross,
you always have the solution! 
You are always precious and kind!

Thank you so much!
Andrea

Justin Browns19

unread,
Nov 24, 2021, 12:49:11 PM11/24/21
to GAM for Google Workspace
Thanks for this info Ross,
I like to add to it.
If I have an Org with sub orgs like Staff>org1
staff ORg2 
What commands would show you all the disabled accounts under Staff including the sub orgs 

Then what command if I wanted a specific org like staff/org2. What command would show those users. 

Does this command require advance Gam?

Thanks

Ross Scroggs

unread,
Nov 24, 2021, 1:27:02 PM11/24/21
to google-ap...@googlegroups.com
Justin,

These commands require Advanced GAM:
Staff and sub-orgs: 
gam print users query "orgUnitPath='/Staff' isEnrolledIn2sv=False" fields primaryemail,isenrolledin2sv,ou
Staff only: 
gam print users query "orgUnitPath='/Staff' isEnrolledIn2sv=False" limittoou "/Staff" fields primaryemail,isenrolledin2sv,ou
Staff sub-org only: 
gam print users query "orgUnitPath='/Staff/Org2' isEnrolledIn2sv=False" limittoou "/Staff/Org2" fields primaryemail,isenrolledin2sv,ou

Ross
--

Randal Stowell

unread,
Aug 26, 2022, 4:02:24 PM8/26/22
to GAM for Google Workspace
What syntax should I add to only include non-suspended users?

Ross Scroggs

unread,
Aug 26, 2022, 5:05:28 PM8/26/22
to google-ap...@googlegroups.com
Randal,


query "orgUnitPath='/Staff' isEnrolledIn2sv=False isSuspended=False"

Ross

This message is intended solely for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential, and exempt from disclosure under applicable law.  If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying or use of this communication or any information contained or attached to this message is strictly prohibited.  If you have received this communication in error, please notify the sender immediately by replying to this message and then delete it from your system.  Thank you.

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


--

Randal Stowell

unread,
Aug 27, 2022, 8:40:58 AM8/27/22
to google-ap...@googlegroups.com
Thanks, Ross!

Respectfully,
photo

Randal Stowell
District Senior Network Engineer at  Wauconda CUSD 118
 555 North Main Street, Wauconda, IL 60084
(847) 865-1043 
(815) 218-1486 
rsto...@d118.org 
www.d118.org

Need Tech Assistance?  Create a Helpdesk Ticket
here  →  https://www.d118-helpdesk.info/  ← 


Randal Stowell

unread,
Aug 27, 2022, 10:16:15 AM8/27/22
to google-ap...@googlegroups.com
*** UPDATE ***

Here's what worked for me:

gam print users query "orgUnitPath='/Teachers' isEnrolledIn2sv=False isSuspended=False" fields primaryemail,lastLoginTime,isenrolledin2sv,ou todrive

Thanks again, Ross!


Respectfully,
photo

Randal Stowell
District Senior Network Engineer at  Wauconda CUSD 118
 555 North Main Street, Wauconda, IL 60084
(847) 865-1043 
(815) 218-1486 
rsto...@d118.org 
www.d118.org

Need Tech Assistance?  Create a Helpdesk Ticket
here  →  https://www.d118-helpdesk.info/  ← 

Reply all
Reply to author
Forward
0 new messages