Skip to content

403 insufficientPermissions: Request had insufficient authentication scopes. #519

@abrebion

Description

@abrebion

Hey,
I can' use any cli commands due to permission issues. I followed setup instructions and was able to setup and auth with success messages for both commands. gws auth status returns:

{
"auth_method": "oauth2",
"client_config": "/Users/anthony/.config/gws/client_secret.json",
"client_config_exists": true,
"client_id": "10226913....com",
"config_client_id": "10226913....com",
"credential_source": "token_env_var",
"enabled_api_count": 72,
"enabled_apis": [
"aiplatform.googleapis.com",
"alertcenter.googleapis.com",
"analyticshub.googleapis.com",
"appsmarket-component.googleapis.com",
"artifactregistry.googleapis.com",
"autoscaling.googleapis.com",
"batch.googleapis.com",
"bigquery.googleapis.com",
"bigqueryconnection.googleapis.com",
"bigquerydatapolicy.googleapis.com",
"bigquerydatatransfer.googleapis.com",
"bigquerymigration.googleapis.com",
"bigqueryreservation.googleapis.com",
"bigquerystorage.googleapis.com",
"bigtable.googleapis.com",
"bigtableadmin.googleapis.com",
"calendar-json.googleapis.com",
"certificatemanager.googleapis.com",
"chromewebstore.googleapis.com",
"cloudaicompanion.googleapis.com",
"cloudbuild.googleapis.com",
"cloudfunctions.googleapis.com",
"cloudresourcemanager.googleapis.com",
"cloudscheduler.googleapis.com",
"cloudsecuritycompliance.googleapis.com",
"cloudtasks.googleapis.com",
"cloudtrace.googleapis.com",
"compute.googleapis.com",
"containeranalysis.googleapis.com",
"containerfilesystem.googleapis.com",
"containerregistry.googleapis.com",
"dataform.googleapis.com",
"dataplex.googleapis.com",
"deploymentmanager.googleapis.com",
"dns.googleapis.com",
"docs.googleapis.com",
"drive.googleapis.com",
"eventarc.googleapis.com",
"geminidataanalytics.googleapis.com",
"gkebackup.googleapis.com",
"gmail.googleapis.com",
"groupssettings.googleapis.com",
"gsuiteaddons.googleapis.com",
"iam.googleapis.com",
"iamcredentials.googleapis.com",
"iap.googleapis.com",
"logging.googleapis.com",
"meet.googleapis.com",
"monitoring.googleapis.com",
"networkconnectivity.googleapis.com",
"networkmanagement.googleapis.com",
"osconfig.googleapis.com",
"oslogin.googleapis.com",
"people.googleapis.com",
"pubsub.googleapis.com",
"recommender.googleapis.com",
"reseller.googleapis.com",
"run.googleapis.com",
"script.googleapis.com",
"secretmanager.googleapis.com",
"servicenetworking.googleapis.com",
"serviceusage.googleapis.com",
"sheets.googleapis.com",
"slides.googleapis.com",
"source.googleapis.com",
"sql-component.googleapis.com",
"sqladmin.googleapis.com",
"storage-api.googleapis.com",
"storage-component.googleapis.com",
"sts.googleapis.com",
"workflowexecutions.googleapis.com",
"workflows.googleapis.com"
],
"encrypted_credentials": "/Users/anthony/.config/gws/credentials.enc",
"encrypted_credentials_exists": true,
"encryption_valid": true,
"has_refresh_token": true,
"keyring_backend": "keyring",
"plain_credentials": "/Users/anthony/.config/gws/credentials.json",
"plain_credentials_exists": false,
"project_id": "XXXXXXXXXX",
"scope_count": 9,
"scopes": [
"https://www.googleapis.com/auth/calendar",
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/documents",
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/presentations",
"https://www.googleapis.com/auth/spreadsheets",
"https://www.googleapis.com/auth/userinfo.email",
"openid"
],
"storage": "encrypted",
"token_cache_exists": false,
"token_env_var": true,
"token_valid": true,
"user": "XXXXXXXXXXX"
}

But for every call I got this error, ex:

gws drive files list --params '{"pageSize": 5}'
{
"error": {
"code": 403,
"message": "Request had insufficient authentication scopes.",
"reason": "insufficientPermissions"
}
}

Drive is in scope, API is enbaled, I don't understand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions