Immediate Password Change Required for All Users Using GAM

273 views
Skip to first unread message

Mahalakshmi K

unread,
Jun 3, 2024, 5:37:25 AM6/3/24
to google-ap...@googlegroups.com

Hello Everyone,

We have a requirement to change all users' passwords. Each user needs to be prompted to change their password immediately upon logging in, as their account passwords need to expire for everyone. Is it possible to achieve this through a GAM command? If so, could you please share the command?

Thank you.

✉ Kevin Melillo

unread,
Jun 3, 2024, 7:37:33 AM6/3/24
to google-ap...@googlegroups.com
I believe the command is
gam update user <email address> changepassword on

So if you were to have a CSV file with the first line being primaryEmail, and every other line being an email address, and all users are listed, you could do something like the following:

gam csv userlist.csv gam update user ~primaryEmail changepassword on

This would force every user to change their password on their next login.

--
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/CAAgFZeu52qKUygMHiR%2BNxjXCR_9PBb2SJ5kaFYV82WL%2B8xVeyw%40mail.gmail.com.

Mahalakshmi K

unread,
Jun 3, 2024, 9:09:16 AM6/3/24
to google-ap...@googlegroups.com

Alexander Grutza (Alex)

unread,
Jun 3, 2024, 4:12:42 PM6/3/24
to GAM for Google Workspace
You may want to include "signout" in the command if applicable. Sometimes even changing the password doesn't kick users out of Gmail on mobile. It's equivalent to the Admin Dashboard setting "Sign out sign in cookies" (or similar). 

James SEYMOUR

unread,
Jun 3, 2024, 8:57:52 PM6/3/24
to GAM for Google Workspace
You can also run the changepassword command against OUs gam update users ou </Path/To/OU> changepassword true

And, although I have not tested this, you should be able to run against All Users using gam update all users changepassword true


Reply all
Reply to author
Forward
0 new messages