title: How can I figure out the timestamp of the last modification of a Snowflake user via SQL?
body: <p>I would like to get the user's creation date and last modification date via SQL. </p>
  
  <p>I managed to get the <code>meta.created</code> and <code>meta.lastModified</code> via <a href="https://docs.snowflake.com/en/user-guide/scim-intro.html#user-attributes" rel="nofollow noreferrer">SCIM</a> but I would really like to get this information via SQL directly if it's possible. </p>
  
  <p>Example output (<code>/scim/v2/Users?startIndex=200&amp;count=1</code>)</p>
  
  <pre><code>{
    "schemas" : [ "urn:ietf:params:scim:api:messages:2.0:ListResponse" ],
    "Resources" : [ {
      "schemas" : [ "urn:ietf:params:scim:schemas:core:2.0:User", "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User" ],
      "id" : "1",
      "meta" : {
        "resourceType" : "User",
        "created" : "2020-05-27T09:09:19Z",
        "lastModified" : "2020-05-27T09:09:19Z"
      },
      "userName" : "synthesis_user",
      "displayName" : "synthesis_user_display_name",
      "name" : {
        "givenName" : "synthesis_user_first_name",
        "familyName" : "synthesis_user_last_name"
      },
      "emails" : [ {
        "primary" : true,
        "value" : "synthesis.user@snowflake.com"
      } ],
      "active" : false,
      "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User" : {
        "defaultWarehouse" : "synthesis_warehouse",
        "defaultRole" : "synthesis_role",
        "snowflakeUserName" : "synthesis_name"
      }
    } ],
    "totalResults" : 1,
    "startIndex" : 1,
    "itemsPerPage" : 1
  }
  </code></pre>
  
  <p>I managed to get the creation date via the column <code>CREATED_ON</code> on `SNOWFLAKE.ACCOUNT.USERS':</p>
  
  <pre><code>SELECT CREATED_ON FROM "SNOWFLAKE"."ACCOUNT_USAGE"."USERS" WHERE NAME='xxxx'; 
  </code></pre>
  
  <p>But there is no other column there to indicate "last modification date" (the only columns that return a timestamp <code>TIMESTAMP_LTZ</code> are <code>CREATED_ON</code>, <code>DELETED_ON</code>, <code>BYPASS_MFA_UNTIL</code>, <code>LAST_SUCCESS_LOGIN</code>, <code>EXPIRES_AT</code>, <code>LOCKED_UNTIL_TIME</code>). </p>
  
  <p><strong>So my question is there some other place where I can get when what the last change made to the user?</strong> And by change made to the user I mean changes to the objectProperties of objectType user, or in other words the last <code>ALTER USER xxxx SET ...</code> </p>