google-directory-api

How can I access user info on a domain without the domain administrator enabling API access?

穿精又带淫゛_ 提交于 2019-12-02 03:46:20
问题 I have written an application that I have listed in the Google Marketplace. I am trying to get my app to use the Directory API (part of the Admin SDK). According to the documentation here: https://developers.google.com/admin-sdk/directory/v1/guides/prerequisites, this will require anyone who installs my app to enable API access. The only scope I need is: https://www.googleapis.com/auth/admin.directory.user.readonly Is there any way to access the above scope without requiring API access to be

How can I access user info on a domain without the domain administrator enabling API access?

霸气de小男生 提交于 2019-12-02 01:01:50
I have written an application that I have listed in the Google Marketplace. I am trying to get my app to use the Directory API (part of the Admin SDK). According to the documentation here: https://developers.google.com/admin-sdk/directory/v1/guides/prerequisites , this will require anyone who installs my app to enable API access. The only scope I need is: https://www.googleapis.com/auth/admin.directory.user.readonly Is there any way to access the above scope without requiring API access to be enabled? All I am ultimately trying to do is import users from a domain into my app so that they do

How do I check if a user has 2-factor authentication enabled via Google Admin SDK APIs

会有一股神秘感。 提交于 2019-12-01 22:04:51
问题 I am using the Google Admin SDK APIs to manage users (create/update) in our organization's Google apps account. We allow users to optionally use the 2-factor authentication feature and I'd like to be able to determine if an account has it enabled or not when one of our internal support reps looks up their account. Looking over the docs at https://developers.google.com/admin-sdk/directory/v1/reference/users, I do not see any attributes that would indicate this setting. Is there another way for

How do I check if a user has 2-factor authentication enabled via Google Admin SDK APIs

烈酒焚心 提交于 2019-12-01 20:53:48
I am using the Google Admin SDK APIs to manage users (create/update) in our organization's Google apps account. We allow users to optionally use the 2-factor authentication feature and I'd like to be able to determine if an account has it enabled or not when one of our internal support reps looks up their account. Looking over the docs at https://developers.google.com/admin-sdk/directory/v1/reference/users , I do not see any attributes that would indicate this setting. Is there another way for me to check if it is enabled via an API? Emily Saw an answer from an old Stackoverflow post: Find all

404 Resource Not Found: domain with Google Directory API

一曲冷凌霜 提交于 2019-12-01 11:06:01
I followed the quick start and am attempting to create a user using the google-api-ruby-client. I've set up access in the google api console. And I can get this to work using the API explorer. But when I try using the ruby client, I'm getting a resource not found: domain error. Here's the code: def self.create_user # Initialize the client. client = Google::APIClient.new( :application_name => 'MYAPP', :application_version => '0.0.1' ) # Authorization # Load our credentials for the service account key = Google::APIClient::KeyUtils.load_from_pkcs12(KEY_FILE, KEY_SECRET) client.authorization =

Accessing G Suite Admin SDK using service account

假如想象 提交于 2019-12-01 08:19:34
I am trying to use a service account to access Directory API ( https://developers.google.com/admin-sdk/directory/v1/reference/users/list ). The simplest task is to list users in the organization. That works well with my user account, tested with the OAuth 2.0 Playgorund. But I need to use service account. I am following documentation for two-legged OAuth ( https://developers.google.com/identity/protocols/OAuth2ServiceAccount ) and implementing REST client in Powershell API Access enabled in Google Admin Console The service acount is created and P12 credentials downloaded. The account is

Google Admin Directory API is returning 400 bad request

跟風遠走 提交于 2019-11-28 13:57:29
I'm experimenting with the Java client for Google Admin SDK, specifically the Directory API. It's based on the use of GoogleCredentials just like Google Drive API. However, unlike Google Drive I'm getting 400 - bad request errors with Directory. I setup the API as follows: Directory directory = new Directory.Builder(TRANSPORT, FACTORY, credential).build(); Directory.Users.List list = directory.users().list(); Users users = list.execute(); The last execute() produces the error and stack trace listed at the bottom of the post. I'm using the following scopes to authorize myself. I also use the

Google Admin Directory API is returning 400 bad request

蓝咒 提交于 2019-11-27 07:59:49
问题 I'm experimenting with the Java client for Google Admin SDK, specifically the Directory API. It's based on the use of GoogleCredentials just like Google Drive API. However, unlike Google Drive I'm getting 400 - bad request errors with Directory. I setup the API as follows: Directory directory = new Directory.Builder(TRANSPORT, FACTORY, credential).build(); Directory.Users.List list = directory.users().list(); Users users = list.execute(); The last execute() produces the error and stack trace

Enable mail forwarding using a Google Apps Service Account

半城伤御伤魂 提交于 2019-11-27 07:22:14
问题 On April 20, 2015, several Google Apps APIs are being discontinued, including the Provisioning API(gdata). In my Python scripts, I am using a Service Account and OAuth 2.0, instead of ClientLogin, and the replacement API: Directory API. However, I am unable to find a way to enable mail forwarding using the new API, and all of Google's Python documentation for mail forwarding explains how to do it using ClientLogin, which is also being discontinued on April 20th. Relevant Info: I have a