Questions tagged [google-directory-api]

Google Apps and reseller administrators can use the Directory API to manage Mobile and Chrome OS devices, groups, group aliases, members, organization units, users, and user aliases.

Directory APIs is part of the Admin SDK APIs. The Google 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.

The Directory APIs is organized by resource type. Each resource type has one or more data representations and one or more methods.:

  • Chromeosdevices
  • Groups
  • Members
  • Mobiledevices
  • Orgunits
  • Users
  • Users.aliases
  • Users.photos
  • Groups.aliases
  • Asps
  • Tokens
  • VerificationCodes
  • Notifications
  • Channels
  • Schemas

Links

422 questions
15
votes
0 answers

What is the best way to synchronize users and groups using Google Directory API

We have to get the latest update about users and groups with Google directory API asap. For users, we now save the "Etag" in the response of users.list, groups.list and members.list in the first synchronization. Then the etag will be checked every a…
hoozecn
  • 497
  • 4
  • 14
10
votes
1 answer

OrgUnit Not Found using Google Directory API

Procedure I'm going to:1. Get a OrgUnit from the Google Directory API 2. Read the OrgUnit and collect the required Data 3. Try to delete the OrgUnit I just collected. This somehow results in a 404 [Not Found] Error Please keep in mind that the…
Nick Prozee
  • 2,823
  • 4
  • 22
  • 49
9
votes
3 answers

Insufficient Permission: Request had insufficient authentication scopes in google directory API when logging through admin

I'm using google admin directory API to get all accounts public information using following API https://www.googleapis.com/admin/directory/v1/users here is link for this api link when I logged in using g suite domain account let say…
Asad
  • 3,070
  • 7
  • 23
  • 61
8
votes
1 answer

Why does a service account with delegated domain access still need impersonation?

I am considering using OAuth 2.0 service accounts and domain-wide delegation of authority to integrate our service with Google Apps. A particular use case is: When Google Apps customer signs up for our service, pre-provision our service leveraging…
7
votes
1 answer

Change READ TIMEOUT for a batch HTTP Request on using Google API Client Library for Java

I am making batch requests for adding members to groups. For this I am using OAuth2.0 and obtaining the object of class type Credential.When executed, the batch.execute() throws a java.net.SocketTimeoutException : Read timed out To change the…
6
votes
0 answers

How to retrieve a users Organizational Unit when they Authorize Oauth2.0

BIT OF INFO: We are trying to build a login for students that use Google Classroom, or Google G-Suite for Education. Essentially, a Single Sign-On system. Students and admins will login, I will validate their email extension, which will be unique…
James
  • 1,562
  • 15
  • 23
6
votes
1 answer

How do I check if a user has 2-factor authentication enabled via Google Admin SDK APIs

I am using the Google Admin SDK APIs to manage users (create/update) in our organization's Google apps account. We allow users to optionally use the 2-factor authentication feature and I'd like to be able to determine if an account has it enabled or…
Phillip
  • 643
  • 6
  • 15
6
votes
3 answers

Google Admin Directory API is returning 400 bad request

I'm experimenting with the Java client for Google Admin SDK, specifically the Directory API. It's based on the use of GoogleCredentials just like Google Drive API. However, unlike Google Drive I'm getting 400 - bad request errors with Directory. I…
Rlp
  • 121
  • 1
  • 1
  • 4
5
votes
3 answers

gsuite service account for directory api returns http 400 errors: Bad request/Invalid input

I have started to develop some apis to create users in my G suite directory. I followed the service account tutorials along with the Directory tutorials for python. The code I have is very simple just to test out how it will work. from google.oauth2…
5
votes
2 answers

Google app-engine updating user information getting error 400 BAD_REQUEST

While updating user information using Directory API of Admin SDK getting an error : 400 BAD_REQUEST { "code" : 400, "errors" : [ { "domain" : "global", "message" : "Invalid Input: Bad request for ", "reason" : "invalid" } ], …
5
votes
1 answer

Google Static Maps API with encoded polyline

I have made a request to google directions API and recived the following JSON directions: (file to large to copy here) https://gist.githubusercontent.com/crooksey/9930819/raw/947e4d17a93ca94b78216d92fbd94b281966dede/directions_api At the bottom,…
5
votes
1 answer

Using the Google Directory API to provision thousands of users

I'm trying to write an application that creates mail accounts for thousands of users using the Google Directory API. Creating them one by one works, but is extremely slow. I tried to use the batch requests which is suppose to support up to 1000…
4
votes
0 answers

Has anyone successfully used Google Admin SDK with Google Cloud Functions?

My org is new to Google Auth and we have poured countless hours into documentation readings. The mission was simple: view members in our google groups through the Directory API. Our setup: The cloud function deploys and runs with a service account…
4
votes
2 answers

Does a Service Account have to impersonate a user to access the Directory Api?

I think I might be misunderstanding how Service Accounts work in GCP, as I don't understand why (in my situation) they need to impersonate a user to complete a task. I need to access some information that is within the Workspace Admin SDK API (for…
4
votes
1 answer

Service account not Authorized to access this resource/api while trying to access directory api using Python

We use Python to get all users from a particular G Suite managed domain, but after completing the following tutorial and granting all the access needed to the Service Account, the following snippet still produces "Not Authorized to access this…
1
2 3
28 29