google-admin-sdk

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

流过昼夜 提交于 2019-12-11 02:49:53
问题 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 = 'xxxxxxxxxxxxxxxxx.apps.googleusercontent.com'; $serviceAccountName = 'xxxxxxxxxxxxxxxxxxx@developer.gserviceaccount.com'; $delegatedAdmin = 'superadmin@domain.com'; $keyFile = 'mw-gxxxxxxxx.p12'; $appName = 'Example App'; $scopes = array( 'https://www.googleapis.com/auth/admin.directory.group' );

Manage gmail signatures with python service account

丶灬走出姿态 提交于 2019-12-11 00:40:53
问题 I want to edit signatures of users in a google apps domain. I plan to use a service account. The service account is delegated to the entire domain. I have this working with the gmail API to send and retrieve email, but signatures are modified using a different api. According to https://developers.google.com/admin-sdk/email-settings/ this api is the Admin SDK which I have enabled via Google Developer Console. I am trying to use the library gdata.apps.emailsettings.client (which doesn't have

Directory query returns only 100 users

空扰寡人 提交于 2019-12-11 00:19:34
问题 I borrowed code from here to download directory data from my Google domain into a spreadsheet. All I changed in the code was to replace OpenByURL with OpenByID because of an invalid argument error. Now it works, except it only returns the first 100 users from my domain. I have about 1000 users total, perhaps a few more. Can I pull all of them? If not, can I at least increase the limit beyond 100? And/or how can I limit my query to a particular Organizational Unit? My full code below: function

Using nextpagetoken to pull more than 500 results in Google Apps Script query

本小妞迷上赌 提交于 2019-12-10 18:25:32
问题 In a helpful response to this post I learned that I can pull a maximum of 500 user results from my domain directory at once. Now I am trying to get a script to continue to run and pull batches of 500 until it pulls all the users from the domain (or, in this case, the OU) and adds them all to the same spreadsheet. Right now my code looks like this: function writeToSpreadsheet(){ var values = []; var users = AdminDirectory.Users.list({ domain:'klht.org', maxResults: 500, query: "orgUnitPath=

Google Admin SDK Channel Stop endpoint is broken in client libraries

被刻印的时光 ゝ 提交于 2019-12-10 12:08:06
问题 There appears to be something wrong with the Google Admin SDK Channel Stop endpoint affecting all the language libraries. At least Node, Ruby and PHP. I'm having the issue with "directory"… It should be: https://www.googleapis.com/admin/directory/v1/channels/stop (404) This works: https://www.googleapis.com/admin/directory_v1/channels/stop This is generated: https://www.googleapis.com/admin/directory/v1//admin/directory_v1/channels/stop (404) Someone else if having the problem with "reports"…

Google Admin Directory API: Add User Employee Details

∥☆過路亽.° 提交于 2019-12-08 20:58:33
I already have a working function for adding user using Google Admin Directory: string password = Random_Password(); User newuserbody = new User(); UserName newusername = new UserName(); UserOrganization newuserorg = new UserOrganization(); newusername.GivenName = GivenName; newusername.FamilyName = FamilyName; newuserbody.Name = newusername; newuserorg.Department = Department; newuserorg.CostCenter = Country; newuserorg.Title = JobTitle; newuserbody.Organizations = newuserorg; newuserbody.PrimaryEmail = GivenName + "." + FamilyName + email_suffix; //SET PASSWORD newuserbody.Password =

I can't see the files and folders created via api in my Google Drive using php

家住魔仙堡 提交于 2019-12-08 16:33:28
问题 I am trying to create folder using google drive api. I am able to get file id at the end. but i am not able to my folder in google drive. it seems some permission issue? $scopes = array( 'https://www.googleapis.com/auth/drive', 'https://www.googleapis.com/auth/drive.appdata','https://www.googleapis.com/auth/drive.apps.readonly', 'https://www.googleapis.com/auth/drive.metadata','https://www.googleapis.com/auth/drive.file', 'https://www.googleapis.com/auth/drive.readonly','https://www

Google Apps Calendar Resource API v1 (Atom/OAuth 1.0) likely lifespan?

荒凉一梦 提交于 2019-12-08 12:03:23
问题 I work with a Google Apps for Education domain and have been asked to write an application that maintains some Google Calendar resources and permissions thereof. I am aware that Google has deprecated support for OAuth 1.0/1.0a and is moving away from Atom based services to JSON based services. It therefore concerns me that the Google Apps Calendar Resource API is currently old style Atom/OAuth 1.0. I'm loathed to write an application using Atom/OAuth 1.0 if it is likely it will become

Fetch the details of all suspended users in G-suite Admin SDK

我与影子孤独终老i 提交于 2019-12-08 11:44:45
问题 I am trying to extract the details of all suspended users in G-Suite Admin SDK, for which I wrote a query in Google Apps script: function fetchUser(){ var pageToken; var membersList = AdminDirectory.Users.list({ domain: 'xyz.com', orderBy: 'email', query: isSuspended=true, maxResults: 100, pageToken: pageToken }); Logger.log('membersList:' +membersList); } The result that I am getting in the logs is: [18-06-20 16:32:15:413 EDT] membersList:{"kind":"admin#directory#users","etag":"\

Get group members with an admin account / deprecated GroupsManager class

我的梦境 提交于 2019-12-08 08:54:16
问题 The class GroupsManager will be turned off by November 20, 2014 https://developers.google.com/apps-script/reference/domain/groups-manager I am using this class to manage some groups with my admin account as it's allowing access to group members WITHOUT BEING MEMBER OF . Sample code here: var group = GroupsManager.getGroup("some-group-name@mydomain.com"); var members = group.getAllMembers(); Using the Groups Service https://developers.google.com/apps-script/reference/groups/ is not an option,