google-admin-sdk

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:/

Migrate application developed with the Provisioning API to the new api (Admin SDK)

大城市里の小女人 提交于 2019-12-08 07:44:32
问题 Reviewing the new api (Admin SDK) Admin SDK. I found the following problem, none of these APIs have support 2 legged for the google apps marketplace, there is a way to integrate these new apis or if in the future the google apps marketplace will support for OAuth 2.0. 回答1: The Admin SDK APIs function with Two Legged OAuth just fine, I'm using the Directory API in my marketplace app today. You'll need to go into your Vendor Profile page on the marketplace, click "Register for additional APIs"

How to access the Google Calendar Resource API?

耗尽温柔 提交于 2019-12-08 07:27:33
问题 I can access the Google Calendar API just fine after enabling it in the Developer's Console, as explained in this SO post. However, I can't find the Google Calendar Resource API in the list to enable. In spite of this, I have tried to access the Resource API via OAuth 2.0 like how I access the Calendar API, but I get the following error: Exception in callback of async function: Error: failed [403] <HTML> <HEAD> <TITLE>You are not authorized to use this API.</TITLE> </HEAD> <BODY BGCOLOR="

Have you used Google's Directory API?

依然范特西╮ 提交于 2019-12-08 06:01:18
问题 I'm trying to use Google Directory API Library for .NET to maintain email addresses for a domain. The latest library is google-admin-directory_v1-rev6-csharp-1.4.0-beta. The best and farthest I've gotten so far is to receive a 403 error (Not Authorized to access this resource/api). Has anyone out there successfully used it? If so, could you share some code, tips, or tricks? 回答1: I have used it and got some success in creating a console-application. At the moment I'm trying to find a way to

Google Directory API 403 Insufficient Permission errors when requesting all account users

馋奶兔 提交于 2019-12-08 05:20:40
问题 I am trying to use the java Directory API to return a list of all the users in an account following the method outlined in the Google Documentation, however I consistently get 403 permission errors. Using the Java SDK my code looks like this, which 403 fails on the execute: Directory directory = new Directory.Builder(TRANSPORT, JSON_FACTORY, getCredential()).setApplicationName(PRODUCT_FULL_NAME).build(); Directory.Users.List list = directory.users().list(); list.setCustomer("my_customer");

AdminDirectory.Members.list Authorization error

霸气de小男生 提交于 2019-12-07 20:11:17
问题 I'm experimenting with Admin SDK and trying to list Group Members in a Google Spreadsheet. Here's the code I've come up with: function recordGroupsMembers() { var ss = SpreadsheetApp.getActiveSpreadsheet(); // Get all groups var groupPageToken, groupPage; do { groupPage = AdminDirectory.Groups.list({ domain: 'mydomain.com', maxResults: 100, pageToken: groupPageToken }); var groups = groupPage.groups; if (groups) { //Iterate groups for (var i in groups) { var group = groups[i]; //Get members

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

Migrate application developed with the Provisioning API to the new api (Admin SDK)

半世苍凉 提交于 2019-12-07 16:11:28
Reviewing the new api (Admin SDK) Admin SDK . I found the following problem, none of these APIs have support 2 legged for the google apps marketplace, there is a way to integrate these new apis or if in the future the google apps marketplace will support for OAuth 2.0. The Admin SDK APIs function with Two Legged OAuth just fine, I'm using the Directory API in my marketplace app today. You'll need to go into your Vendor Profile page on the marketplace, click "Register for additional APIs" and enable Admin SDK. You'll also need to add the needed API scopes to your manifest. Also note that the

What is the format for the Directory.users().list().setQuery method?

[亡魂溺海] 提交于 2019-12-07 14:07:03
问题 The documentation states: Query string for prefix matching searches. Should be of the form "key":"value" where key can be "email", "firstName" or "lastName". I've tried: directory.users().list().setQuery("email:" + email).execute() directory.users().list().setQuery("\"email\":\"" + email + "\"").execute() directory.users().list().setQuery("email:\"" + email + "\"").execute() They all return a 400 : Bad Request response. How do I properly filter on the email address? Thank you! 回答1: Currently

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