question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OAuth permissions

See original GitHub issue

Expected Behavior

clasp login should grant access to the app script API.

Actual Behavior

  1. That’s an error. Error: admin_policy_enforced

Access to your account data is restricted by policies within your organization. Please contact administrator for more information.

Request Details access_type=offline scope=https://www.googleapis.com/auth/script.deployments https://www.googleapis.com/auth/script.projects response_type=code client_id=xxxxxxxxxx-xxxxx.apps.googleusercontent.com redirect_uri=http://localhost:60194 That’s all we know.

Steps to Reproduce the Problem

I’m trying to use the clasp tool as a G-Suite user, and I have enabled Apps Script API at https://script.google.com/home/usersettings

But the clasp login is giving the above error inside the browser. While our G-Suite Administrator is willing to change the required policies/permissions, he couldn’t find any documentation on how to grant the access rights needed for clasp tool or Error logs on what permission was missing.

Can somebody help us figure out what needs to be done to enable the API access to use the clasp tool?

Specifications

  • Node version 8.9.1
  • Version : @google/clasp@1.1.5
  • OS Windows

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
imthenachomancommented, Nov 3, 2020

Is there anyway to get the App ID added to some kind of official Google approved documentation? Many organizations have super tight security requirements and can’t/won’t authorize random App IDs they see in source code files. They need to see something official saying that is the App ID so there is accountability. Something that shows 1072944905499-vm2v2i5dvn0a0d2o4ca36i1vge8cvbn0.apps.googleusercontent.com belongs to Google for clasp and that Google’s privacy policy applies.

3reactions
grantcommented, Apr 3, 2018

For admin-restricted domains, you can have your admin whitelist clasp by following the instructions here: https://support.google.com/a/answer/7281227

To do this, you click the “Trusted Apps” link in that section of the UI, and then add a trusted app, selecting “Web App” and pasting in the clasp client ID 1072944905499-vm2v2i5dvn0a0d2o4ca36i1vge8cvbn0.apps.googleusercontent.com

Let me know if that works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

OAuth 2.0 Scopes
Scope is a mechanism in OAuth 2.0 to limit an application's access to a user's account. An application can request one or more...
Read more >
Overview of permissions and consent in the Microsoft identity ...
Learn the foundational concepts and scenarios around consent and permissions in the Microsoft identity platform.
Read more >
OAuth API: OAuth Permissions Reference - Square Developer
Reference for all OAuth permissions (scopes) needed to call Square API endpoints with an OAuth access token.
Read more >
OAuth 2.0 Scopes for Google APIs | Authorization
This document lists the OAuth 2.0 scopes that you might need to request to access Google APIs, depending on the level of access...
Read more >
Scopes for OAuth Apps - GitHub Docs
Scopes let you specify exactly what type of access you need. Scopes limit access for OAuth tokens. They do not grant any additional...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found