427 questions
0
votes
1
answer
70
views
How to use a Google Service Account with Admin SDK?
I would like to use the Members function of the Admin SDK of Google. I'm using PHP and Codeigniter 3. I created a Service Account in the Google Cloud Console.
My Codeigniter model:
use Google\Client ...
1
vote
0
answers
80
views
Getting Forbidden trying to use Google Directory Services API
I keep getting Forbidden while trying to access Google Directory Services API. I am attempting to access via a Service Account.
I have enabled Admin API and Directory Services API
I have specified ...
1
vote
1
answer
105
views
Service account not Authorized to access this resource/api while trying to access directory api though Domain-Wide Delegation Enabled
I'm trying to connect to the Google Directory API (REST Resource: users) via Airflow. I want to get a list of users within the organizational google workspace as well as update some attributes.
I want ...
0
votes
0
answers
184
views
API Accessing using Domain Wide Delegation
I'm trying to use Google Workspace's Directory API to list users and running into problems with permissions. I get a 403 response with a message: "Not Authorized to access this resource/api"...
0
votes
0
answers
158
views
How to retrieve profile photos from the Google Contacts API?
The Google Contacts API has a few endpoints useful for getting contacts:
people.connections.list
otherContacts.list
people.listDirectoryPeople
otherContacts.list is the most useful: it includes ...
0
votes
1
answer
105
views
Is there a way to fetch a list of computer assets from google workspace directory API?
I'm trying to fetch a list of computer assets (Linux, macOS, and Windows) from the Google Workspace Directory API but haven't found any relevant documentation. In the available documentation, there ...
0
votes
2
answers
220
views
How can I get the Google Role of the User?
I am setting up an web application on ASP .NET Core 5 with Google Auth. I want to be able to mark certain pages with an Authorize attribute to only allow users with a given Role to access.
The access ...
-1
votes
1
answer
950
views
Google workload identity federation to call directory API
I'm trying to set up Google Identity Federation with AWS to make admin.directory API calls from aws lambda function. It is written in Java.
I set up workload pool, created service account and ...
2
votes
1
answer
683
views
C# Google API for requesting a list of users returns "badRequest"
I have been looking for information on this for a couple days now. I believe I have everything relevant to the API set up correctly for access but I keep getting this error:
The service admin has ...
0
votes
1
answer
160
views
User Mailbox usage report from Google Workspace
I am trying to get a basic email usage report. We need to get user names and the size of their email boxes. The code provided below throws an exception
"<HttpError 400 when requesting https://...
1
vote
0
answers
122
views
Search for multiple users by email address using admin directory users.list Google API
I am trying to use the Admin Directory users.list API (https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/list) to query multiple users with their email address.
I can do query=...
0
votes
1
answer
445
views
Google Directions Api Problem on optimisation
i am using directions api with some waypoints. the thing is that its not optimized, it goes with the order of my array and not with the most efficient order.
i dont want the order of my array to take ...
1
vote
1
answer
116
views
Delay of 30s after creating new user via Google Directory API necessary to see it via Google Classroom API?
I'm developing an API extension of our Woocommerce eshop. The task is to create a new Google Classroom user (if not yet existing) and add this user to the Course.
If the user does not exist yet, i ...
0
votes
1
answer
904
views
Create External Contact in Google Workspace Directory using Domain Shared Contacts API + Python
I cannot figure out how to create (make it visible for all) External Contact in Google Workspace Directory using Domain Shared Contacts API.
The idea is to create an external contact (directory-wide) ...
0
votes
1
answer
162
views
How can I delete admin role assignments from a user accounts using Google Admin API?
I need to delete role assignments from a list of user accounts. I am familiar with Google Apps Script, but need help working out the script needed to delete the role assignments using the Google ...
0
votes
0
answers
68
views
is there a way to get all the mail id's inside workspace using directory api and service account file instead of oauth2 token?
I want to get the mails inside workspace mail for my google function. and updating token time to time is a problem so can this be done with directory api and service account json file??
I want to ...
1
vote
1
answer
2k
views
code": 403, "message": "Not Authorized to access this resource/api
GET https://admin.googleapis.com/admin/directory/v1/groups/{groupKey}/members
I'm unable to make this HTTP call.
here's my code is
from google.oauth2.credentials import Credentials
from google.auth....
0
votes
1
answer
112
views
Super Admin service account not finding resource calendar
I'm attempting to list all events from a Google Workspace Resource Calendar which results in either a "user not found" or "invalid impersonation" depending on which calendar ...
1
vote
1
answer
353
views
Google directory API to get list of users in my domain in C#
I am trying to use Google directory API in .NET Console Application where I want to get a user information. I keep receiving not authorised error, even though I have added the scope, done the domain ...
1
vote
2
answers
593
views
How to create google resource calendar using any API?
I'm looking for a way to create resource calendars for shared rooms and for booking using any google API. In google documentation, it is mentioned that:
The Calendar API does not offer a way to ...
0
votes
0
answers
237
views
How to use Streams instead of do while loop?
How to avoid imperative loops and use the Java's Streaming API for the below mentioned implementation for the google directory API?
List<GroupMember> groupMemberList = new ArrayList<>();
...
1
vote
1
answer
324
views
Grant Third Party Application Access to Google Drive API and Admin SDK API of another Organization's Google Workspace
We are working on a Migration App for Google Drive (Google Workspace) and are relatively new to Google APIs. I read that administrator need to grant domain-wide delegation of authority to third-party ...
0
votes
1
answer
433
views
Google Directory API: Search for groups using a search term containing a space
I am looking to search for Groups using the Google Directory API, as per the documentation at https://developers.google.com/admin-sdk/directory/v1/guides/search-groups#fields
In particular, I am ...
0
votes
0
answers
10
views
Google Directory API convert timestamp to DateTime [duplicate]
I'm getting info about chromeos devices through the directory API. https://developers.google.com/admin-sdk/directory/reference/rest/v1/chromeosdevices
The autoupdateexpiration field returns an int64 ...
2
votes
1
answer
116
views
Directory API Java users.list permissions
please, anyone could tell me which permissions I should grant a user or service account to be able to access "Admin SDK Directory API" and use users.list method?
Thanks in advance.
Stefano
2
votes
0
answers
2k
views
"oauth2: cannot fetch token: 401 Unauthorized" happens sometime in Google Workspace Directory API
I created the code which get the member's information by Google Workspace Directory API. This code is executed everyday, and sometime I fece the error which is "oauth2: cannot fetch token: 401 ...
-1
votes
1
answer
122
views
Will Directory api store my password as plain text if I dont specify hashfunction value in request body?
Will Directory api store my password as plain text if I dont specify hashfunction value in request body . kindly tell me
0
votes
1
answer
227
views
How to list all google directory subscription channels
I'm working on integration with Google Directory and create subscription channels to watch users updates using this API https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/watch
...
0
votes
0
answers
166
views
Is there a programmatic way to access and retrieve data from the Google Admin Dashboard Settings?
Is there any way to get the settings data from Google Admin Dashboard. I have a list of policies that need to be satisfied with this.
I've already gone through Google's documentation for Workspace ...
0
votes
1
answer
621
views
Http delete request to Google Directory API returning 412 Precondition is not met: location If-Match
I have been using Postman to send http requests to Google's Directory API. The GET request works fine (which shows that the admin token as well works fine) to get info for a user.
But, what I need to ...
4
votes
0
answers
789
views
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 ...
1
vote
2
answers
524
views
Invalid Hash Function Name on SHA2-512 when creating user
Trying to create user using from golang using library "google.golang.org/api/admin/directory/v1"
As docs sad here https://developers.google.com/admin-sdk/directory/reference/rest/v1/users#...
1
vote
1
answer
3k
views
Adding member to a Google group using Google API
I'm trying to add email ids to a Google group using google APIs and Python3. I need help, figuring out what scopes it needs since I am getting the error:
Request is missing required authentication ...
0
votes
1
answer
223
views
Google Directory API - OS version policy compliance
On the Google admin console, when looking at chrome devices, you can see their "OS version policy compliance", as seen in the image below:
However, when retrieving a device from the ...
1
vote
2
answers
2k
views
How to get only specific fields with Google Directory API users.list
The documentation (https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/list#query-parameters) says you can use customFieldMask to get only specific fields. I cannot figure out ...
5
votes
2
answers
6k
views
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 ...
1
vote
1
answer
972
views
how to get Google groups contents by using directory API or Cloud Identity API
Can anyone please suggest to me how to get the content of google groups by using 2 different API
Cloud identity API
google directory API
We need to get the google group content.
0
votes
1
answer
915
views
How to call Google Apps Script API by a service account
I'd like to use a service account to access Google Spreadsheet via Google Apps Script API.
But now the Apps Script API doesn't seem to work with service accounts according to the following document.
...
0
votes
1
answer
160
views
Google Workspace Admin SDK insert member always set type to "USER", how to resolve this?
https://developers.google.com/admin-sdk/directory/reference/rest/v1/members
https://developers.google.com/admin-sdk/directory/reference/rest/v1/members (click for image)
It doesn't matter what I set &...
0
votes
1
answer
515
views
Can't create email aliases in bulk for Google Workspace
I have a script built in .NET that creates users in bulk and also creates an alias.
Users are created in Google Admin console, however it seems that it doesn't complete the email alias information. ...
0
votes
0
answers
625
views
Dynamic localhost URL in redirect URI
I'm running the Directory API https://developers.google.com/admin-sdk/directory/v1/quickstart/python in Google Colab. To use the API I need to authorize an account and it prompts me to login using my ...
0
votes
2
answers
78
views
Cannot create new GSuite accounts w/ Alias as of 2021-11
I'm trying to create users in Google directory using the Google Directory APIs, specifically Google.Apis.Admin.Directory.directory_v1. If I add a user with an alias, it will fail with an error of &...
0
votes
1
answer
359
views
List all existing calendar resources with Google service account (Directory API)
I can't get all company calendar resources via service account and Directory API. All good when I fetch the resources with my user account. Somehow service account and my user account do not share ...
1
vote
1
answer
338
views
Issues with retrieving profile image from Google Admin SDK/Directory API
I am trying to retrieve a user's profile picture in Python using either the users.get method or the users.photos.get method from the Google Directory API. I have set up my service account with the ...
1
vote
0
answers
125
views
Error When Trying To Insert New User With Google Apps Script
My script is failing with the following error when attempting to insert a new user through Google Apps Script:
GoogleJsonResponseException: API call to directory.users.insert failed with error: ...
1
vote
0
answers
302
views
How to get access token for a Google Workspace account valid for all users
I have one Google workspace account for which I want to get access token which I can use to call APIs for all users of that workspace account.
private static GoogleCredential getCredentials(...
1
vote
2
answers
816
views
How to retrieve Google group membership with a service account?
I'm trying to retrieve/update Google group membership in a background process with a service account but getting this error when executing query. How to add these permissions to the service account?
...
0
votes
1
answer
189
views
Second level orgunit not found
I'm using the google admin api class to check for organization units. First level works, but second level fails. I've tried putting it in single quotes as per other posts, but still won't find it, and ...
0
votes
1
answer
1k
views
How can I access Google Directory API using service account json
I have a service account key json file like following:
{
"type": "service_account",
"project_id": "project-id",
"private_key_id": "key-id&...
-1
votes
1
answer
355
views
Having issues with the Appscript pulling data from Google workspace using Reports API
The following code is pulling data to Google sheets from Google workspace using Reports API. However it is giving me only last 2 days of data not sure why, there are no limits set in the script.
The ...