Existing Project Setup - Error 404: Unknown service account

399 views
Skip to first unread message

Kameron S-D

unread,
Jan 12, 2021, 2:02:56 PM1/12/21
to GAM for Google Workspace
I'm trying to setup GAM on a headless Debian cloud VM to use for some nightly automations.

I'm trying to connect via this command: gam use project admin [admin email] project [project ID]

This command was used per the documentation here:

However - I'm getting the attached output (project ID redacted though)...

Am I doing something wrong here?

Thanks,
KSD
gamerror.txt

Alan Muntadas

unread,
Mar 12, 2021, 4:38:55 AM3/12/21
to GAM for Google Workspace
I have the same error...
I am connecting to an existing project, on a new install of GAM
any pointers on where to look ?
thanks

Alan Muntadas

unread,
Mar 12, 2021, 4:57:07 AM3/12/21
to GAM for Google Workspace
I was able to resolve my issue, but downloading the existing client-secrets.json from the cloud console and placed it in the GAM folder.. i got the authentication screen and all is good now  :)

Kameron S-D

unread,
Mar 13, 2021, 6:49:14 PM3/13/21
to google-ap...@googlegroups.com
IIRC - I think a core issue was that somehow a ton of whitespace was randomly getting added to the key in .json file. I had to end up refreshing my .json file a couple of times and this happened each time.
Every time I'd pull it down, I had to delete the whitespace from it... I ended up making a short powershell script to not have to deal with fixing it manually anymore:

$file = [.json path]
(get-content $file) -replace " ","" | set-content $file

I don't have it nearby so the above could be inaccurate...

--
You received this message because you are subscribed to a topic in the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/4bJUhrms5SY/unsubscribe.
To unsubscribe from this group and all its topics, 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/621c2017-0daf-48d7-b028-19bf13135881n%40googlegroups.com.

Brian Kim

unread,
Mar 14, 2021, 8:51:27 AM3/14/21
to GAM for Google Workspace

I think JSON files can be formatted slightly differently depending on what OS is used.

As for reusing existing project, I don't think GAM likes it if a service account/key pair already exist in the project, but you can always manually create/download client_secrets.json and oauth2service.json.

Reply all
Reply to author
Forward
0 new messages