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
4
votes
1 answer

Is there any way to retrieve groups for member with option:directOnly=false using Admin SDK?

Provisioning API provided "directOnly" parameter to control range of groups when retrieving gropus that user belongs to. I supposed to migrate Admin SDK from Provisioning API, but I didn't find way to retrive groups for user with directOnly=false.…
4
votes
4 answers

Google Directory API returns Not Authorized when call users().list().execute()

I need to read the list of users (and groups) from my google domain. So I went to my Google APIs Console and enabled Admin SDK and created a Service Account to call Google APIs. I use the following google…
dmitry747
  • 573
  • 1
  • 7
  • 27
4
votes
2 answers

Reports API 503 Backend Error

For the past couple of weeks the batch task I use to retrieve User Usage Reports from the Reports API has been failing with the following response: com.google.api.client.googleapis.json.GoogleJsonResponseException: 503 OK { "code" : 503, …
4
votes
2 answers

Support for Service Accounts OAuth2 scenario

Does Directory API support authentication with OAUth2 Service Accounts flow? I tested the serviceAccount.php google-php-api-client example using the scopes https://www.googleapis.com/auth/admin.directory.group and…
luissquall
  • 1,740
  • 19
  • 14
3
votes
1 answer

What does different Client ID means for same app in google admin reports API?

I am getting different client ID in reports API response for same app, eg slack, but these does not correspond to slack specific workspaces, rather it looks random to me. Does anyone know what does different client ID refers to here?
vibhu jain
  • 51
  • 3
3
votes
1 answer

Is it possible to programmatically manage Gmail messages quarantined through Google Workspace?

My team is using Google Workspace's quarantine feature to quarantine some Gmail messages. We want to manage quarantined emails programmatically instead of through the interface in Google Workspace. We can't find any way to programmatically list or…
jgaul
  • 591
  • 2
  • 7
3
votes
3 answers

TypeError: getCurves is not a function

I am trying to give custom claims to certain users for my react web app and I couldn't get past this error. Error: TypeError: getCurves is not a function ./node_modules/jose/lib/registry/ec_curves.js 2 | 3 | const curves = new Set() 4 | > 5…
3
votes
0 answers

Firebase messaging subscribe to topics after token refresh and multiple devices sync

From my testing and understanding, I noticed that when a user subscribes to a topic using Device A, and logs in on Device B. Device B will not receive that topic's notification unless the user subscribes to that topic from Device B as well. How can…
Yassin Sameh
  • 361
  • 2
  • 13
3
votes
1 answer

How to impersonate user using Go Google SDK?

I have a user which I use to query the Reports API. I generated the token and read the credentials using the google.ConfigFromJSON method. Although, now I need to do the same, but instead of a user, I need to use a service account. And accordingly…
KadoBOT
  • 2,944
  • 4
  • 16
  • 34
3
votes
2 answers

googleapi: Error 500: Internal error encountered., backendError when calling Admin SDK

This is strange we have started receiving too many per day (nearly 300-500 times) googleapi: Error 500: Internal error encountered., backendError while calling Admin SDK Directory API. https://developers.google.com/admin-sdk/directory Google chat…
3
votes
2 answers

Google G Suite ( Workspace ) How to disable the passcode on the device

Our team uses Google Calendar to share the schedule, and it works fine by using the browser. But when we use the app on the phone (both iOS and Android), it will always show a warning message like: Your org requires you to set a passcode on this…
3
votes
2 answers

Not Authorized To Access This Resource/API (GCP)

I set up a service account with domain-wide delegation and I passed the client email, private key, scopes, and a user email the JWT method to impersonate a G-Suite user. I then get specific user info from the Admin API and use it to create an email…
3
votes
1 answer

Can applications with Domain-Wide Delegation enabled do more than the scopes allow by impersonating a superadmin?

Applications in GSuite can have domain-wide delegation (DWD) enabled, allowing the application to access user data (and other domain data) without any interaction on the part of the users. According to a Google Support article, it is implied that…
3
votes
0 answers

Check if a user is an admin with Google API (with a non-sensitive scope)

My app requires additional setup by the admin for the users to start using it. I am aware of the setup url for admins when they install the app in the Google Apps Marketplace but I want to be sure only admins can get to my endpoint. All I have found…
3
votes
0 answers

Getting publicly accessible user thumbnail URL for GSuite public user photos

User's photo URLs are available through the Directory API (I'm using the Java client, which shouldn't matter), however the URL provided is in the private scope, even when that user's profile image is set to public. This causes redirection to a…
Andrew Ring
  • 3,185
  • 1
  • 23
  • 28