How to access managed by type attribute on google admin api via google cloud identity - google-api

How to parse management type or managed by (fundamental, endpoint, etc) on google admin via google identify API or any other google API scope for that matter? To be clear I am not looking for a management state which I can grab via API.
I am looking for managed by in this screen shot. I have looked through all Google cloud identity api and Google admin directory sdk. Any help would be appreciated.

Related

Databricks with Google Ads API Authentication

I was wondering if anyone has had experience authenticating for Google Ads API via Databricks. The Google Ad Manager documentation indicates that a YAML file should be created using the service account credentials, but it's not an option for me to upload that to DBFS based on some references I've read about since they are credentials.
Wondering if there are any suggestions on how to authenticate on Databricks using YAML or another format.
Here is the link to the GAM documentation on authentication: https://developers.google.com/ad-manager/api/start

Structure of google project in developer console

I am implementing Google Drive API and Google Sheets API to my application. How should I go about structuring the project in Google Developers console?
First I created the Drive connection and Oauth2 for it, then filled the verification request with scopes
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/userinfo.email
which was verified.
Then I created another Oauth2 for Sheets API and after trying to verify the scopes
https://www.googleapis.com/auth/spreadsheets
But my request got denied with message that I already have https://www.googleapis.com/auth/drive.file scope.
So should I create separate project for each API or use same Oauth2 for both of them?
Each application is a project in Google developer console. Assuming you are trying to access user data then you should create Oauth2 credentials and request all of the scopes that you will need for the application.
If the application is using
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/userinfo.email
https://www.googleapis.com/auth/spreadsheets
Then you would need to active all three APIs in the Google Developer console. However I think that drive.file scope gives you the same access to all the files in Google drive there fore you dont need the spreadsheets scope.
https://www.googleapis.com/auth/drive.file View and manage Google Drive files and folders that you have opened or created with this app
vs
https://www.googleapis.com/auth/spreadsheets View and manage your spreadsheets in Google Drive

Google API to retrieve information about an OAuth app

How can I programmatically retrieve information about an OAuth client given its appId (xxxx.apps.googleusercontent.com). I am interested in retrieving Google API scopes the app is requesting (e.g.: https://www.googleapis.com/auth/userinfo.email) along with marketplace ratings and user coun t (if applicable).
Screenshot
I believe you can only access those stats if you own the app/add-on. Assuming that you're working on a GSute add-on, if you deploy the app via GSuite Marketplace you'll have to explicitly specify the scopes your app requires and you can check those scopes from your Google Console. I believe that there is also a dashboard available to the app developer (probable from Google Console) with analytic data related to performance.

Getting list of documents related to a particular user in Google Apps using Admin Account

i am creating an app using google apis.i need to access user's documents through google apis using google admin account.In past i can use google docs api like this
for example i am admin of domain iritesh.com and my email address is ritesh#iritesh.com.i logged in using admin account and can retrieve documents in google drive of rajat#iritesh.com using user_id = rajat#iritesh.com.
https://docs.google.com/feeds/"+user_id+"/private/full/folder:root/contents?v=3&alt=json
but now google docs api's are deprecated.can anyone please guideline How to acheive this using google apis now.
link reference : https://developers.google.com/google-apps/documents-list/#using_google_apps_administrative_access_to_impersonate_other_domain_users
With the new API's and OAuth 2 you can accomplish this functionality but for it you will have to use Service account with domain wide delegation.
Basically with the service account it would be possible to impersonate users in the domain and make API calls in user's behalf. For getting information about documents you will use the Drive API.
Here is the documentation on service account:
https://developers.google.com/accounts/docs/OAuth2ServiceAccount
And Drive API:
https://developers.google.com/drive/v2/reference/
hope this helps.

How can I access Google Drive API as a domain administrator or as a Marketplace App?

I have a marketplace app that I'd like to use to access the Google Drive API. I'm currently using the gdata API using 2-legged OAuth. My understanding is that the new Google APIs, including Google Drive API do not support 2-legged OAuth.
How can I access the Google Drive API for my customers' domain without asking each of my customers's users for individual permission?
On my Google Apps Marketplace Vendor page, there is a link to the Google APIs Console, with a project linked to my Marketplace App, but there is no option to create an OAuth 2.0 Client ID. I can only create a Simple API key.
Apparently, you used to be able to use the two-legged OAuth credentials along with the server api key to authenticate, but it looks like that's no longer the case. I tried to authenticate using this method with an old Google API .net sdk, but got a 401. I downloaded the newest sdk, and two-legged OAuth is completely missing. I checked out a copy of the Ruby sdk, because it was used in the video "Google Drive SDK: Using the Drive API with the Google Apps Marketplace", but it looks like (I don't know Ruby) it explicitly forbids two-legged OAuth:
case authorization
when :oauth_1
STDERR.puts('OAuth 1 is deprecated. Please reauthorize with OAuth 2.')
I feel like Google is intentionally ignoring my questions about this topic.
You can use domain-wide delegation to access users' data without asking each user. Details are explained on https://developers.google.com/drive/delegation

Resources