API Access Denied - GAMADV-XTD3

3,182 views
Skip to first unread message

Aisha Ahmed

unread,
Aug 10, 2022, 11:32:18 PM8/10/22
to GAM for Google Workspace
I was able to use GAMADV-XTD3 until a few months ago, from my Windows laptop. Am now running into 

ERROR: API access Denied

no matter what command I try. I have updated to the latest version, and double-checked the authorization settings according to https://github.com/taers232c/GAMADV-XTD3/wiki/Authorization

Any suggestions would be much appreciated. Heading into a new term and need to provision courses in fairly short order.

Jeffrey Grospe

unread,
Aug 11, 2022, 8:15:57 AM8/11/22
to GAM for Google Workspace
Hi Aisha,

You might want to reauthorize your access
gam oauth create
gam user <userEmail> check serviceaccount

Aisha Ahmed

unread,
Aug 11, 2022, 11:15:26 PM8/11/22
to GAM for Google Workspace
Thank you Jeffrey!

That did the trick! Thank you so much. Adding in the intermediate steps just for clarity for anyone else:

1 gamoauthcreate
(check that the relevant scopes are selected. If not, use the appropriate option. Otherwise continue as below:)
2 c
3 <userEmail>
4 gam user <userEmail> check serviceaccount

Dave

unread,
Aug 19, 2022, 1:38:08 PM8/19/22
to GAM for Google Workspace
For anyone else who arrives here, I had the same problem, but the solution was a little different...


And when I got to this section, it created a separate Web Application (is this due to the recent upgrade?).

-------------------8<----------------------------
Based on your domain policies, you may have to mark GAM as a trusted app.

* Access the admin console and go to Security -> Access and data control -> API controls
* Check Trust internal, domain-owned apps
* Click Manage third-party app access
* Click Add app and select OAuth App Name or Client ID
* Paste client_id value from client_secrets.json
* Click Search
* Click Select at right end of line referenceing GAM
* Check box to the left of the line with GAM client ID
* Click Select
* Click Trusted: Can access all Google services
* Click Configure
---------------------------->8-------------------

Then I did...

     gam oauth refresh
     gam oauth update
     gam user us...@example.com check serviceaccount
     gam info domain

This finally solved the API Access Denied error.
Reply all
Reply to author
Forward
0 new messages