google-directory-api

GoogleApps client giving SocketTimeOutException only

江枫思渺然 提交于 2019-12-11 09:09:57
问题 We wrote a client to create a user on googleapps using the GoogleNetHttpTransport, but we are getting a socketTimeoutException when making the user as Super Admin through superadmin api. Connecting User has superAdmin Privileges itself. How to increase the ReadTimeOut/SocketTimeout when we are using the GoogleNetHttpTransport . Please find below code snippent on connecting to target and making the client httpTransport = GoogleNetHttpTransport.newTrustedTransport() ; GoogleCredential

How can I programatically attach recovery email when creating user's e-mail address

ぃ、小莉子 提交于 2019-12-11 04:50:56
问题 I'm creating an application that creates google apps accounts using a WWW application. User for which we are creating that account provides his personal e-mail address that will be set as an recovery e-mail address (it really makes sense in this case!). I couldn't find a way to set user's recovery e-mail address. Is there a way to do this programatically. 回答1: Like the phone number used for recovery and Login Challenges, I don't believe it's possible to set a recovery email address for a user

403 error from Google Admin SDK with AppAssertionCredentials

大城市里の小女人 提交于 2019-12-11 04:25:40
问题 I'm trying to list users via Google admin directory API. import logging import os from google.appengine.api import memcache from googleapiclient import discovery from oauth2client.contrib.appengine import AppAssertionCredentials import httplib2 from flask import Flask credentials = AppAssertionCredentials(scope='https://www.googleapis.com/auth/admin.directory.user') auth_http = credentials.authorize(httplib2.Http(cache=memcache)) service = discovery.build('admin', 'directory_v1', http=auth

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' );

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 =

Get a list of users on a Google Apps domain

ぃ、小莉子 提交于 2019-12-08 08:35:02
问题 We have an app in the Google Apps Marketplace (the new one, i.e. using OAuth2) which needs to get a list of users in the domain. We're currently using the Provisioning API for this (which we know is deprecated, but there seems to be no better option). Lately however, we're starting to get "You are not authorized to access this API" 403's, for some domains. Does anyone know why we're suddendly getting 403's, a bug perhaps? There seem to be some other bugs as well, for example the scope https:/

Google Admin SDK error Resource Not Found: domain when trying to list existing users

自作多情 提交于 2019-12-08 02:52:00
问题 I am trying to write a simple script to get a list of my Google Apps users using Google's python API. So far it looks like this (based on a Google example): !/usr/bin/python import httplib2 from apiclient import errors from apiclient.discovery import build from oauth2client.client import OAuth2WebServerFlow from oauth2client.client import SignedJwtAssertionCredentials client_email = 'service_account_email@developer.gserviceaccount.com' with open("Python GAPS-98dfb88b4c9f.p12") as f: private

Non-admin read-only access to Google Admin SDK

别说谁变了你拦得住时间么 提交于 2019-12-07 16:26:46
问题 In a post on the Google Developers blog from September 23, 2014, it says: Read access to all domain users Historically, only admins have been able to access the data in the Admin SDK. Beginning today, any user (not just admins) will now be able to call the Directory API to read the profile of any user on the domain (of course, we will respect ACLing settings and profile sharing settings). However, despite checking every Google Apps Admin setting I can find, my calls calls to the Directory API

members.list() in Google Admin SDK Directory API (Java)

只谈情不闲聊 提交于 2019-12-07 11:19:22
问题 I have a piece of code(in Java) to list all members of a group on a personal Google Apps Domain. This uses the google Directory API. Here is the snippet: public static void listMembers(String groupKey,Directory service) throws IOException { Members res = service.members().list(groupKey).execute(); List<Member> members = res.getMembers(); int count = 0; if (members == null || members.size() == 0) { System.out.println(); System.out.println("No members found."); } else { System.out.println();

Why is type of these User properties object: Addresses, Emails, Organizations, etc?

六眼飞鱼酱① 提交于 2019-12-06 14:58:35
问题 I am referring to the Google.Apis.Admin.Directory.directory_v1.Data.User type. The property type of Addresses , for example, in beta versions (i.e. 1.7 and older) was public virtual System.Collections.Generic.IList<UserAddress> Addresses { get; set; } In later versions (currently 1.9.1), they are all of type object. public virtual object Addresses { get; set; } What are the reasons behind the change and usage scenarios? I trawled the release notes, the web, google group, SO, etc. and found no