Below was my GAM session history.
______________________________________________________________________________
jvic@cloudshell:~$ gam info domain
WARNING: Config File: /home/jvic/.gam/gam.cfg, Section: lamaicoco, Item: device_max_results, Value: 500, Expected: integer 1<=x<=200, Used: 200
Customer ID: C0___tg9
Primary Domain:
lamaicoco.comPrimary Domain Verified: True
Customer Creation Time: 2024-05-07T11:46:59Z
Default Language: en
Address:
contactName: K_____________an
organizationName: La________________Ltd.
addressLine1: 19______________________ok
locality: A__________________________ni
region: P______________i
postalCode: 1___________0
countryCode: T__________H
Phone: +6_______________6
Admin Secondary Email: k___________________m
User counts as of 2025-05-20:
Total Users: 6
jvic@cloudshell:~$ gam user k____________m delete messages query 'older_than:2y'
WARNING: Config File: /home/jvic/.gam/gam.cfg, Section: lamaicoco, Item: device_max_results, Value: 500, Expected: integer 1<=x<=200, Used: 200
ERROR: Service Account OAuth2 File: /home/jvic/.gam/lamaicoco/lamai_oauth2service.json, Does not exist or has invalid format, Unable to load PEM file. See https://cryptography.io/en/latest/faq/#why-can-t-i-import-my-pem-file for more details. MalformedFraming
Please rungam create|use project
gam user <user> update serviceaccount
to create and authorize a Service account.
jvic@cloudshell:~$ gam show svcaccts all
WARNING: Config File: /home/jvic/.gam/gam.cfg, Section: lamaicoco, Item: device_max_results, Value: 500, Expected: integer 1<=x<=200, Used: 200
Enter your Google Workspace admin or GCP project manager email address authorized to manage project(s): filter all?
ad...@lamaicoco.comGo to the following link in a browser on this computer or on another computer:
https://accounts.google.com/o/oauth2/v2/auth?response_type=code&client_id=297408095146-fug707qsjv4ikron0hugpevbrjhkmsk7.apps.googleusercontent.com&redirect_uri=http%3A%2F%2F127.0.0.1%3A8080%2F&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform&state=G3R5KPQAZqcq3OJAnq2MjsiFxmJKve&code_challenge=JbOm8miEwRkuHMFZrvZjucdcxwFQXuK9BdZXoZjqsxI&code_challenge_method=S256&access_type=online&login_hint=admin%40lamaicoco.comIf you use a browser on another computer, you will get a browser error that the site can't be reached AFTER you
click the Allow button, paste "Unable to connect" URL from other computer (only URL data up to &scope required):
Enter verification code or paste "Unable to connect" URL from other computer (only URL data up to &scope required):
http://127.0.0.1:8080/?state=G3R5KPQAZqcq3OJAnq2MjsiFxmJKve&code=4/0AUJR-x5IijPPfRCe4Vm__G4T7XN4QU5zdcs00fgujrwsSjrS3igBB0sU81mI0rkVFtb7Xg&scope=https://www.googleapis.com/auth/cloud-platformThe authentication flow has completed.
User:
ad...@lamaicoco.com, Show Service Accounts for 4 Projects
Project: ga_____________5jr, Show 1 Service Account (1/4)
email:
ga________...@gam-project-dc5jr.iam.gserviceaccount.com displayName: GAM Project
description: GAM Project
oauth2ClientId: 117247676727592570072
uniqueId: 117247676727592570072
Project: ga___________dia, Not Shown: Deleted (2/4)
Project: ga__________68, Not Shown: Deleted (3/4)
Project: ga_____________g6, Not Shown: Deleted (4/4)
jvic@cloudshell:~$ gam user k______________m delete messages query 'older_than:2y'
WARNING: Config File: /home/jvic/.gam/gam.cfg, Section: lamaicoco, Item: device_max_results, Value: 500, Expected: integer 1<=x<=200, Used: 200
ERROR: Service Account OAuth2 File: /home/jvic/.gam/lamaicoco/lamai_oauth2service.json, Does not exist or has invalid format, Unable to load PEM file. See
https://cryptography.io/en/latest/faq/#why-can-t-i-import-my-pem-file for more details. MalformedFraming
Please run
gam create|use project
gam user <user> update serviceaccount
to create and authorize a Service account.
jvic@cloudshell:~$