Send password reset link with GAM

1,635 views
Skip to first unread message

Sergio Alvarez

unread,
Jan 25, 2022, 3:59:21 PM1/25/22
to GAM for Google Workspace
Hi, 

I was wondering as I was not able to see it in the documentation if there is a way for GAM to send a password reset link to end-users. This is not a password reset that I know can be done with 

gam update user ~email_address password ~password

but to send the email with the URL so that the user can set the new password automatically?

Sergio Alvarez

unread,
Jan 25, 2022, 5:08:51 PM1/25/22
to GAM for Google Workspace
Closest solution that I can find is:

gam update user <email> password random notify <AlternateEmail> changepassword true

that will update the password to a random password and then set the change password to true, requesting the user to update the password after first login and login out the user. But if we can instead of using that command send the password reset link, that would be more than useful. 

Regards 

Kim Nilsson

unread,
Jan 28, 2022, 4:11:07 AM1/28/22
to GAM for Google Workspace
Actually, your solution is a good one.

But you could also instead force a password change, and the user will immediately be taken to the password reset place.

gam update user <email> changepassword true

Sergio Alvarez

unread,
Jan 30, 2022, 5:24:39 PM1/30/22
to GAM for Google Workspace
Hi, 

Thanks for the follow-up, it works to some extent, the main problem is that these users do not have the Google password because they are using SSO, So We would need to let them know in someway the password to use, seems like this method does require the google password first. but thank you very much 

Kim Nilsson

unread,
Jan 30, 2022, 6:05:01 PM1/30/22
to Google Apps Manager
Oh, then you shouldn't at all use any of this.
You should force a password change in the source system. 

Changing the Google password, and not the source password, will only mess things up. 

Sergio Alvarez

unread,
Jan 30, 2022, 6:07:49 PM1/30/22
to GAM for Google Workspace
Thank you very much for the help !

On Friday, January 28, 2022 at 3:11:07 AM UTC-6 there.is.no...@gmail.com wrote:

Daisy Tirado

unread,
Nov 9, 2022, 4:22:32 PM11/9/22
to GAM for Google Workspace
Hello Sergio,
Were you able to find a solution for this?

I would like gam to reset a password and create a temp password and email it to an alternate email address.
Is that possible?

Sergio Alvarez

unread,
Nov 9, 2022, 5:32:57 PM11/9/22
to GAM for Google Workspace
Hi Daysi, 

What I wanted to do at the beginning was to send a reset link instead of placing a temp password. That is not possible. But if you want to set a temp password, send that password over an email yes, totally possible. 

gam update user ~GoogleEmailAddress password random notify ~Altemail subject "New Google Workspace Account Password" file C:\Gam\template.html html true changepassword true

That should send a temp password to a different email address with the subject that you want and a template that is in the file location specified. The user will be requested to set a new password 

Daisy Tirado

unread,
Nov 10, 2022, 2:56:42 PM11/10/22
to GAM for Google Workspace
Hey! Thank you so much!

James SEYMOUR

unread,
Nov 13, 2022, 7:26:41 PM11/13/22
to GAM for Google Workspace
Hi Daisy (and anyone else following this thread),

To use Sergio's solution you will need a CSV or Google Sheet with the users GoogleEmailAddress and their Altemail email address.

Then start the command with either gam csv file.csv or gam csv gsheet <User Email Address> <File ID> <Sheet Name> followed by Sergio's command. The file.csv or the Google Sheet will need column headings of GoogleEmailAddress and their Altemail as specified in Sergio's command.

Cheers

James
Reply all
Reply to author
Forward
0 new messages