2
votes

The app I'm writing is an employee directory system. We'd like to make it possible for companies using Google Apps to install our Google Apps Marketplace app, and through that installation have all of their Google Apps users appear in our employee directory app. The general issue we are struggling with is that when a company admin adds our marketplace app, we would like to start setting our system immediately, but we don't have enough information to do so. We really need access to the Directory API in order to do our setup. This doesn't seem to be possible with a service account unless we know the email address or id of a valid admin user. We don't know that until they authenticate on our site, which they don't necessarily do after the app installation.

Here is a short list of questions that could really help us figure out our onboarding flow:

  1. Is there any way to get a notification or callback when someone installs our app? Preferably with information about what user installed it.

  2. Is there any way to get a list of users and/or admins using a service account, even if we don't know any user information yet?

  3. Do you know of any applications with similar requirements that are doing a good job of onboarding accounts through the apps marketplace?

  4. Can my service account make Directory API calls if "Enable API access” is unchecked for a given Google Apps customer? I recently ran into a permissions error because API access was disabled but I thought Google Marketplace Apps didn’t have this restriction.

For reference, here are the auth scopes our application requests: https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/admin.directory.user https://www.googleapis.com/auth/admin.directory.orgunit https://www.googleapis.com/auth/admin.directory.group https://apps-apis.google.com/a/feeds/domain/

Really appreciate your help, thanks!

1

1 Answers

3
votes
  1. There isn't a callback mechanism for installs but you can poll the Licensing API to get that information.

  2. Once the admin has installed the app, you can search for users with the Directory API's user.list method.

  3. No one comes to mind at this time.

  4. Unfortunately, there might be cases where customers still have that bit disabled. For new domains, we have it enabled by default. If an admin explicitly disables it, they still can install apps and API access would not work. We're working on a fix.

  5. Why are you asking for https://apps-apis.google.com/a/feeds/domain/? The provisioning api is deprecated but you should be able to retrieve with the Directory API's user.list method.