google-admin-sdk

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

非 Y 不嫁゛ 提交于 2019-12-05 15:12:16
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(); System.out.println("Members of "+groupKey); for (Member member : members) { count++; System.out.println

Listing Password complexity Google Admin SDK

ε祈祈猫儿з 提交于 2019-12-05 10:39:24
问题 From the Google Admin panel there is a nice password strength meter and password length feature. From the admin panel go to Security >> Password Monitoring. Is there a programatic way of getting this info exported in a report? 回答1: There is not. The Admin SDK Directory and Reports APIs do not return any information on password complexity / strength. 来源: https://stackoverflow.com/questions/31148889/listing-password-complexity-google-admin-sdk

Google Python Admin SDK using Oauth2 for a Service Account (Education Edition)-“oauth2client.client.AccessTokenRefreshError: access_denied” exception

╄→尐↘猪︶ㄣ 提交于 2019-12-05 10:03:58
I have been trying to get the Service Account authentication working for the Google Admin SDK for a few days now to no avail. I am using the google-api-python-client-1.2 library freshly installed from Google. I have been following Google's documentation on the topic. Links are here: htps://developers.google.com/accounts/docs/OAuth2ServiceAccount htps://developers.google.com/api-client-library/python/guide/aaa_oauth htp://google-api-python-client.googlecode.com/hg/docs/epy/oauth2client.client.SignedJwtAssertionCredentials-class.html And have the tasks.py Service Account example working which

What privileges are required to call the directory.user.update api?

房东的猫 提交于 2019-12-05 07:24:04
问题 Our organization uses SAML for SSO into Google Apps. In order to use SSO we must manage the change password functionality through APIs. Since the Provisioning API has been deprecated in favor of the Admin SDK Directory API, I am developing against this API. The flow I am developing is that the end user will login using Google OAuth2 into my application. Then, using the users access token I am attempting to call the https://www.googleapis.com/admin/directory/v1/users/ API to put a new password

How to get a CustomerId (or other primary key) for a Google Apps account?

主宰稳场 提交于 2019-12-05 02:43:24
问题 When a user logs on to our Marketplace V2 app, we need to know which Google Apps account the user belongs to. The id_token contains the 'hd' parameter (the domain name), but that's not enough, as a Google Apps account can have multiple domains. CustomerId seems like a good primary key to match users to the correct Google Apps account. The problem is, it doesn't seem to be included in the id_token. Is there some way to figure out what the CustomerId of a user is. The Admin SDK would be one

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

醉酒当歌 提交于 2019-12-04 21:33:01
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 explanation on this. A change to the backend had the unintended consequence of changing the

Admin SDK and 2 Legged Oauth

北城余情 提交于 2019-12-04 20:35:24
Has anyone had any luck getting 2 Legged Oauth working with the Admin SDK and python? The only thing I can see in the docs at https://developers.google.com/admin-sdk/directory/v1/guides/authorizing about 2LO is the following: "If your application has certain unusual authorization requirements, such as logging in at the same time as requesting data access (hybrid) or domain-wide delegation of authority (2LO), then you cannot currently use OAuth 2.0 tokens. In such cases, you must instead use OAuth 1.0 tokens and an API key. You can find your application's API key in the Google APIs Console, in

Create users using Service Account with Google Admin SDK?

一笑奈何 提交于 2019-12-04 20:07:13
The documentation is a little unclear on this. Can I actually do this? The only examples I've seen so far are from the Google documentation that show it using the GoogleAuthorizationCodeFlow class to gain authorization. I've seen a few examples of using the Service Account to update and retrieve a list of users, but nothing for creating. Is this possible? If so, does anyone know of any examples floating around? I can't seem to find anything that addresses it. omerio You can follow the steps outlined in the following API docs page to create the service account and perform a domain wide

Creating a group with Admin SDK Directory API in Google Apps Script - Error 403

纵饮孤独 提交于 2019-12-04 19:04:21
I've read through all of the relevant pages in the Admin ADK Directory API documentation and several questions on stackoverflow, and I'm still stuck. I'm trying to use Google Apps Script (container-bound within the Script Editor of a Google Sheet) to create a group. I am the super admin of my Google Apps domain, and the scripts will be running as me. Here's what I did in the Script Editor so far: Went to Resources - Advanced Google Services... - turned on the Admin Directory API Clicked the link below that for the Google Developers Console and enabled the Admin SDK Took working code that I

How do I use JWT to access Google Directory (Admin SDK) using NodeJS client libraries?

非 Y 不嫁゛ 提交于 2019-12-04 12:05:18
问题 I'm trying to make a server application that will add/remove users to my domain's groups. Note that it will not have any interaction with users, it is server-to-server application. I registered my application in the Google API Console, downloaded the key and transformed it to .pem by issuing openssl pkcs12 -in my_google_key.p12 -out my_google_key.pem -nocerts -nodes Then I've been to the Domain Administration, Security -> Advanced Settings -> Authentication -> Manage OAuth Client access.