function main(organizationId = 'YOUR_NUMERIC_ORG_ID') {
  // [START securitycenter_list_assets_at_time]
  // Imports the Google Cloud client library.
  const {SecurityCenterClient} = require('@google-cloud/security-center');

  // Creates a new client.
  const client = new SecurityCenterClient();
  //  organizationId is the numeric ID of the organization.
  /*
   * TODO(developer): Uncomment the following lines
   */
  // parent: must be in one of the following formats:
  //    `organizations/${organization_id}`
  //    `projects/${project_id}`
  //    `folders/${folder_id}`
  const parent = `organizations/${organizationId}`;

  const oneDayAgo = new Date();
  oneDayAgo.setDate(oneDayAgo.getDate() - 1);

  // Call the API with automatic pagination.
  async function listAssetsAtTime() {
    const [response] = await client.listAssets({
      parent: parent,
      filter:
        'security_center_properties.resource_type="google.cloud.resourcemanager.Project"',
      // readTime must be in the form of a google.protobuf.Timestamp object
      // which takes seconds and nanoseconds.
      readTime: {
        seconds: Math.floor(oneDayAgo.getTime() / 1000),
        nanos: (oneDayAgo.getTime() % 1000) * 1e6,
      },
    });
    let count = 0;
    Array.from(response).forEach(result =>
      console.log(
        `${++count} ${result.asset.name} ${
          result.asset.securityCenterProperties.resourceName
        }`
      )
    );
  }

  listAssetsAtTime();
  // [END securitycenter_list_assets_at_time]
}
Prints project assets for the organization as of yesterday.