{"id":19740214,"url":"https://github.com/nceas/nceas-gsuite-tool","last_synced_at":"2026-05-14T00:38:16.437Z","repository":{"id":148058765,"uuid":"217432138","full_name":"NCEAS/nceas-gsuite-tool","owner":"NCEAS","description":"Example tool for managing GSuite accounts via API","archived":false,"fork":false,"pushed_at":"2019-10-26T00:32:01.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-28T06:09:06.283Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NCEAS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-25T02:12:48.000Z","updated_at":"2019-10-26T00:32:03.000Z","dependencies_parsed_at":"2023-05-28T08:00:29.559Z","dependency_job_id":null,"html_url":"https://github.com/NCEAS/nceas-gsuite-tool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NCEAS/nceas-gsuite-tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NCEAS%2Fnceas-gsuite-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NCEAS%2Fnceas-gsuite-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NCEAS%2Fnceas-gsuite-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NCEAS%2Fnceas-gsuite-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NCEAS","download_url":"https://codeload.github.com/NCEAS/nceas-gsuite-tool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NCEAS%2Fnceas-gsuite-tool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33004989,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"ssl_error","status_checked_at":"2026-05-13T13:14:51.610Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T01:20:02.440Z","updated_at":"2026-05-14T00:38:16.399Z","avatar_url":"https://github.com/NCEAS.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NCEAS GSuite Tool\n\nSimple example script showing how to use the Google GSuite AdminAPI for\nmanaging users and groups.  The current tool performs simple operations:\n\n- list users in domain\n    - `./ngt --list`\n- list groups for a user\n    - `./ngt --list matt@magisa.org`\n- list members of a group\n    - `./ngt --members leaders2@dataone.org`\n- update a users email for all of their groups\n    - `./ngt --update matt@magisa.org mbjones.89@gmail.com`\n\n\n## Installation\n\nThe tool uses several python libraries, which need to be installed first via `pip`:\n\n```bash\n$ sudo pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib\n```\n\n## Authentication\n\nAuthentication is provided via a `credentials.json` file that provides the\nclient id and client secret to be used for all operations.  These can be\nconfigured through the [Google API\nDashboard](https://console.developers.google.com/apis/credentials).  You will\nneed to configure an `OAuth 2.0 client ID` with sufficent privledges for the\nnecessary authentication scopes to be granted:\n\nSCOPES \n\n- `https://www.googleapis.com/auth/admin.directory.user`\n- `https://www.googleapis.com/auth/admin.directory.group`\n- `https://www.googleapis.com/auth/admin.directory.group.member`\n\nOnce the client id is created on the dashboard, download the file to the\ndirectory containing `ngt` and name it `credentials.json`.  The first time you\nrun the tool, you will be requested to authenticate with Google, and allow the\nrequested scopes.  The authorization is cached in a local file so you don't have\nto log in again.\n\n## Example usage\n\n```bash\njones@glacier$ ./ngt --list matt@magisa.org\nGroups for matt@magisa.org:\n\tcommunity@dataone.org\n\toscodefest@nceas.ucsb.edu\njones@glacier$ ./ngt --update matt@magisa.org\nBoth email and new_email are required for update.\njones@glacier$ ./ngt --update\nBoth email and new_email are required for update.\njones@glacier$ ./ngt --update matt@magisa.org mbjones.89@gmail.com\nUpdating groups for matt@magisa.org:\nUpdating group: community@dataone.org\n\tkind: admin#directory#member\n\tetag: \"nM32qckM4XsKqhG-zylXvkNQRY8/yg30o1EeD9k6UTZZd-yqkT98JUs\"\n\tid: 105267514831512253030\n\temail: mbjones.89@gmail.com\n\trole: MEMBER\n\ttype: USER\n\tstatus: ACTIVE\n\tdelivery_settings: ALL_MAIL\nUpdating group: oscodefest@nceas.ucsb.edu\n\tkind: admin#directory#member\n\tetag: \"nM32qckM4XsKqhG-zylXvkNQRY8/yg30o1EeD9k6UTZZd-yqkT98JUs\"\n\tid: 105267514831512253030\n\temail: mbjones.89@gmail.com\n\trole: MEMBER\n\ttype: USER\n\tstatus: ACTIVE\n\tdelivery_settings: ALL_MAIL\njones@glacier$ ./ngt --list mbjones.89@gmail.com\nGroups for mbjones.89@gmail.com:\n\tcommunity@dataone.org\n\toscodefest@nceas.ucsb.edu\njones@glacier$\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnceas%2Fnceas-gsuite-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnceas%2Fnceas-gsuite-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnceas%2Fnceas-gsuite-tool/lists"}