Ross and I have worked on this model extensively.
For me a stock install of advanced gam is easier, but custom directory options are fine.
The tail end of your gam.cfg should look something like this:
[customer_name]
domain = <primary google domain>
customer_id = <google customer id>
config_dir = <subdirectory of your .gam config folder>
Then for each stanza like this, make sure your default section above has no entries for these variable names.
Then in each subdirectory the gam setup commands to create projects and oauth setup will create these:
client_secrets.json
oauth2.txt
oauth2.txt.lock
oauth2service.json
Then when you need to change google domains you have two choices:
Ross: Did I miss anything important? It’s been awhile since we did this.
From:
google-ap...@googlegroups.com <google-ap...@googlegroups.com> on behalf of Matthew Gray <matthew....@gmail.com>
Date: Wednesday, November 9, 2022 at 10:06 AM
To: GAM for Google Workspace <google-ap...@googlegroups.com>
Subject: [GAM] Unable to add addtional (4th) domain to GAM
[EXTERNAL EMAIL]
--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
google-apps-man...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-apps-manager/a2c6aadd-eabd-4e7b-ac42-d13b0e718c97n%40googlegroups.com.
If you are sure of your configuration, then try this
gam update project
gam delete oauth
gam create oauth
gam user <email address> check serviceaccount
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/2ff3cbed-d905-4df0-9e83-cdd1ed23f714n%40googlegroups.com.