How to create Google Workspace/Cloud Administrator account? - google-drive-api

I am trying to set up Domain-Wide Delegation on a service account to allow a web page to interact with the Google Drive API, but the page says I need to log in with an "Administator Account". I have searched, and cannot find a page allowing me to create an Admin Account. Please let me know how to get this set up.

Related

How to allow Google App Maker app access with no sign-in required

I have created an App in Google AppMaker and have shared the Deployment to Anyone with the link can view (No sign-in required).
Application Access in Deployment Settings is set to "Do not restrict access to this application".
Application is set to runs with Developer Account.
However, if someone try to access the app with the..
..Deployment URL (https://script.google.com/macros/.../exec), they get redirected to login screen (https://accounts.google.com/signin/...),
the app does open correctly after signing in, but the sign-in shouldn't be required.
..Link to share (https://drive.google.com/file/.../view), they get: No preview available
I switched once to "Application set to runs with User Account", but results remains same. Actually, I reset this setting as I consider "Application set to runs with User Account" to require User authentication in order to load their assigned permission.
I most probably missed something on the way of sharing my app.
Can someone please help?
Let me know if you require more details about this case.
Thanks!!
You can't.
Note: App Maker apps are only available to users in your G Suite domain. You can't share them with external users.
To make sure only users on your domain can access it, users need to sign-in.

How can I grant user data permissions domain-wide for a google apps script web app (non marketplace)

I have a Google Apps Script Web App distributed to multiple users all in one domain. They trigger it manually via the web app URL available from the publish screen (i.e. it's not a marketplace app). I'm trying to figure out how to grant user data permissions domain-wide if possible so that users don't have to confront a user data request dialog when it first runs for each given user. FYI they are all on g-suite for business. This is not about "verified app" oath, but about the personal data access permissions. Also, if important, the app is published with "execute the app as user accessing the web app" because the app needs to pull the email address of the current user in order to function, and on that same screen, access was given to "anyone". I couldn't find this question posed already—apologies if I'm wrong. Thoughts appreciated!
If possible please publish add-on app within the domain, it will allow the users.
(You can publish web addon within the domain without any extra cost and permission)
More details https://developers.google.com/apps-script/add-ons/domain-wide
Hope it will helpful for you!

How to avoid user consent in Google Drive API

I have integrated Google Drive API with Salesforce. But I would like to avoid "USER CONSENT" manually. Instead I am looking for providing access through REST API. Can anyone help on this.
All applications that access the data of a Google account must obtain the user's consent. It is possible via the Google Apps Marketplace for an admin to grant access for all the user's in their domain, but still some sort of consent is required.

How to use Drive API to impersonate a user without Google Apps for Work

My organization has a project that is using Google Drive to store files. What we want to do is to show the contents of the Drive on a website.
I'm not really sure how to go about this. Most of the examples are showing authenticating the user accessing the site.
Right now, what I am thinking of doing is to use a service account. I have a Node app running a service account, which I just followed from the samples in the Node.js samples. I realized that the contents shown from running the app are the contents of the Drive of the service account.
What I wanted to happen was show the contents of the Drive that owns the project.
I'm not sure if you can get around authentication when it comes to standard User Accounts.
But you don't really need to impersonate a User Account. There is a alternative solution. From your User account, create a folder and move all the files needed by the app into it. Then share the folder with the service account and grant it edit access. To share the folder you'll need to know the email address of the service account which you can find in your Google Developer's Console. To get to the service account's page, click the menu icon (the triple bar) at the top left and select IAM Admin. On that page there should be a menu option for service accounts, when selected it will provide you with a list of all your service accounts and their corresponding email addresses.

How to select account in Google App Scripts for users with multiple accounts?

For users that are logged into multiple accounts, how can a script let the user pick an account? For example, Gmail, Google Drive, etc. provide a way for the user to select which account to use with a selectable option on the top-right of the page:
How can developers implement a similar mechanism?
There seems to be no way to do that with Google Apps Script libraries - GAS just uses the current primary account. Also, unfortunately, the API Client Library and thus Google Sign-In for websites don't work inside GAS web apps because of the sandbox frame. You could write your own or use some existing OAuth implementation to authenticate with Google but I found a much much simpler solution using Auth0 Lock with only a Google Connection (using the popup method because the redirect method doesn't work within the sandbox frame).
With Chrome Version 70.0.3538.102. You may resolve your issue (at least i did)
Now i make sure i ONLY signed in ONE account at a time. Then use "manage people"
if i have 3 google accounts, i will create 3 people and each time you only have 1 active google account session. With this setup, i ensured everytime my script only execute with my G Suite user instead of #gmail accounts
You can try using the Directory API to work with Apps Script. Retrieve the user using:
GET https://www.googleapis.com/admin/directory/v1/users/userKey.
You can then make an interface that displays the user accounts details(Name, email,etc).