title: How to trigger a G Suite password reset email through Google Apps Script?
body: <p>I am creating G Suite user accounts programmatically through a web app powered by Google Apps Script.</p>
  <p>The flow I am following when doing this manually is the following:</p>
  <ol>
  <li>Create the user</li>
  <li>Go through the &quot;reset password&quot; flow</li>
  <li>Send a password reset link to the user</li>
  </ol>
  <p>This enables me to create the users and allow them to set their own password, without having to send them the initial password. I would like to follow the same flow for the user creation through Apps Script, if possible.</p>
  <p>However, in the <a href="https://developers.google.com/admin-sdk/directory/v1/guides/manage-users#update_user" rel="nofollow noreferrer">documentation for the Directory API</a>, it seems like I can only reset the password and force the user to reset it on their next login, but there is no way to send the same password reset email I can send through the G Suite Admin UI.</p>
  <p>Is there a way to do this programmatically? If not through Apps Script, maybe there is a different way?</p>
  <p>For reference, this is the functionality I am refering to (after the actual password reset):</p>
  <p><a href="https://i.stack.imgur.com/hEK3J.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hEK3J.png" alt="Reset password screen" /></a></p>