Can't authorize clasp (login)
Hello. I've been trying to login to clasp as a Google Workspace user, but it always tells me that the admin hasn't allowed the service. However, I'm the admin of Google Workspace for my organization and I've made sure to allow the clasp app/service in the console. I'm at a loss as to what to do next, so any pointers would be welcome. Thank you.
The clasp IDs I have allowed are these two: 1072944905499-6jmucestgjua6htt8e2fdtvp90n5v12q.apps.googleusercontent.com 1072944905499-vm2v2i5dvn0a0d2o4ca36i1vge8cvbn0.apps.googleusercontent.com
These apps are allowed for the whole organization, not just some organizational units. I'm also trying to access the service with the superuser (admin) account from Google Workspace.
Go here: https://script.google.com/home/usersettings
Enable the api there, try again
Good luck!
Thank you for your answer. I tried your solution, but it still says that the app is not authorised (despite the fact that it is...)
Did you have to enable it or was it already enabled?
What do you see if you do
clasp login? Can you share screenshots etc?
@TeacherMN When the system ask for your authorization look at all the permissions; you need to check them all because the authorization (now) is granular. https://workspaceupdates.googleblog.com/2025/01/granular-oauth-consent-in-google-apps-script.html
Can you share exact error messages you're seeing?
There are cases where admin controls can prevent authorization or use of clasp (and apps script entirely!) but not clear from the issue which of these would be the root cause.
There's also an option in 3.0-alpha to set up your own internal GCP project. Previously bring-your-own project was reserved for the clasp run command but is no supported for all commands for instances where orgs have tighter restrictions on authorizing third-party applications. Might be something your admin needs to set up, but can be an option.