Questions tagged [google-admin-sdk]

Use for questions about using APIs and services that are part of the Google (G Suite) Admin SDK, platform for developers that write applications to manage G Suite domains, migrate from and integrate with existing IT infrastructure, create users, update settings, audit activity, and more.

About

The Google (G Suite) Admin SDK allows developers to write applications to manage Google Apps domains, migrate from and integrate with existing IT infrastructure, create users, update settings, audit activity, and more.

Use for questions

About APIs and services that are part of the G Suite Admin SDK

Do not use for questions

About general interaction with Google APIs, use instead.

Admin SDK APIs

: Admin Settings API
: Alert Center API
: Directory API
: Domain Shared Contacts API
: Email Audit API
: Enterprise License Manager API
: Groups Migration API
: Groups Settings API
: GSuite Email Audit API
: GSuite Reseller API (former Enterprise Apps Reseller API)
: Reports API

Deprecated APIs

  1. Email Migration API on November 1, 2015
  2. Email Settings API on October 16, 2019
1554 questions
3
votes
1 answer

Google OAuth 2.0 with Service account with PHP: "Invalid token format error"

I have created my service account, got the private_key and delegated domain wide authority. Here is my code trying to authenticate with the service account but getting the same "Invalid token format error": session_start(); include_once…
3
votes
2 answers

How to get the list of members in a Google group in Google app script (Admin SDK)?

I would like to get a list of members in a Google group using Admin SDK. But im not getting how to do this. I found below link - https://developers.google.com/admin-sdk/directory/v1/guides/manage-group-members But I do not know how to use POST…
3
votes
0 answers

Get licenses by user from License Manager API

Is there any endpoint to get all the licenses assigned to an specific user? like this one: GET https://www.googleapis.com/apps/licensing/v1/product/productId/sku/skuId/user/userId but without {productId} and {skuId}, to receive the licenses actives…
Benn Sandoval
  • 873
  • 7
  • 17
3
votes
0 answers

Create New Service account programmatically

Is there an Google Admin API to create a new service account using the credentials of another service account? I'm creating a SAAS solution where I'm providing certain services to end users from different domains. Google recommends (not restricts)…
PC.
  • 6,870
  • 5
  • 36
  • 71
3
votes
1 answer

Getting 500 "Backend Error" when using Google Groups Migration API

I am attempting to write an app in Python to allow users to migrate their LISTSERV archives to Google Groups for our domain. When attempting to call archive.insert…
3
votes
2 answers

Google Apps API 403 with Service Account

I've been trying make a query against Google's Admin API to list all users in my Google Apps Organization. I have permissions to make this query in the web UI example and get results, but it 403's when I try to make the query with a service…
3
votes
0 answers

Group memberships based on custom schema?

I have read about adding custom attributes to our domain schema. Is there any way to base group membership on this custom schema data? i.e. have a user be added to a group automatically if they have a certain custom attribute flag, or any…
BMellow2
  • 31
  • 1
3
votes
2 answers

How can I access group members with a service account?

I am attempting to use a service account to access members of a group. I have verified that I can do this using a normal OAuth2 token on behalf of a user, with a call to https://www.googleapis.com/admin/directory/v1/groups/{group}/members and the…
3
votes
2 answers

Is there any way to use an "or" operator in Google Directory API users.list query?

I want to build a search query for Google domain users using users.list Google Directory API. I tried to build a query according docs, which will select all users with givenName or familyName starts e.g. on letter "m". I wrote the query:…
3
votes
2 answers

Google Admin SDK Directory API: Adding group as member with role "OWNER" gets error

Trying to use the new Google Admin SDK for some group creation and adding/removing members to those groups. This is actually just updating some code I had that was previously using the old provisioning API. I'm trying to add a group as a member of a…
3
votes
2 answers

Google Directory API - batch add members to a group

I am using the Google Admin SDK to create, update and delete mailing lists (aka groups). Everything works fine so far and I can create a new group and add members to it. But: Every adding of a member takes about 1s so I was thinking of a batch…
3
votes
1 answer

Google Groups Directory API - Add user to group raises error - PHP

I have been trying to add members to my google apps group. I am trying with following code but it raises error. Don't know what is doing wrong. include_once 'api-client/autoload.php'; $clientId =…
3
votes
1 answer

Impersonate current user when calling a Google API using service account & delegation of authority

There is a marketplace requirement that if a Google Apps for Work domain admin installs our app for their domain, the admin and any users from their domain should thereafter not see a scope auth screen when accessing our app. The act of installing…
3
votes
2 answers

Using Argparse with Google Admin API

I am using Google's Python API to pull down auditing information, but I can't get the parent group arguments for argparse (which appear to be required for API access) and my own arguments (e.g. passing in a date) to work together. Code: import…
Alex
  • 397
  • 4
  • 18
3
votes
1 answer

Google Admin SDK: Directory Users: How to get User phone numbers using Java client?

I successfully authenticate using a Service Account and can list the users in my company's Google Directory. However I want to list Users' telephone numbers. I used the java quickstart example code and it works. However it is only printing the…
Karl
  • 1,164
  • 9
  • 25