title: is it possible to lock a user account (g suite) programmatically using google apps scripts
body: <p>also is it possible to do that after a certain log-in attempts?</p>
  
  <p>I'm trying to create a script that locks the user's account after a certain number of failed login attempts.</p>
  
  <p>I tried to check if any functions can be used to access the account setting, or how many times this user failed to login, but I got nothing so far.</p>
  
  <p>Gmail Service allows scripts to send email and access a user's Gmail account.
  With only these Classes</p>
  
  <p>Name            Brief description</p>
  
  <ol>
  <li><p>GmailApp     : Provides access to Gmail threads, messages, and labels.</p></li>
  <li><p>GmailAttachment   : An attachment from Gmail.</p></li>
  <li><p>GmailDraft        : A user-created draft message in a user's Gmail account.</p></li>
  <li><p>GmailLabel        :  A user-created label in a user's Gmail account.</p></li>
  <li><p>GmailMessage       : A message in a user's Gmail account.</p></li>
  <li><p>GmailThread         : A thread in a user's Gmail account.</p></li>
  </ol>
  
  <p>also as far as I know the lock service allows scripts to prevents concurrent access to sections of code(e.g multiple users or processes modifying a shared resource to prevent collisions) but not locking an account .</p>
  
  <p>any help would be appreciated .</p>
  
  <p>Thanks</p>