Search code examples
gmail-apiservice-accountsgoogle-workspace

Create Google Marketplace App only to grant API access to service_account (GSuite)


I have an node.js application with a working server2server GMail API communication via an service_account. Everything works fine.

To be able to communicate with a users account, the G Suite Admin has to grant API Acess to the Client ID of my service_account manually.

As described here: Impersonating list of users with Google Service Account

with a Marketplace App it would be possible, to grant access only to specific organizationals units (OUs) and it would be more fancy to use (enabling a marketing place app is more user friendly than configuring API Access for ClientID and Scope manually like here: enter image description here )

Now my question: Is it possible to provide a Marketplace App only for the purpose to grant API access for my application automatically? Will it get through the review when it has no other purpose? Any other hints on this?


Solution

  • Yes it is a working way to create a marketplace application to grant the API access automatically when the G Suite Admin installs this application.

    The only restriction is, that your actual application has to support Google SSO to make it through the review process. So the user must be able to log into your Web Application by clicking on the icon in his G Suite account. If the user has no account in your web app, an account has to be created automatically (trial-account is sufficient)