I've created a Google Apps Marketplace app with OAuth2 authentication, and I'm able to use a Service Account to list app installation notifications and to get customer info. However, I couldn't find a way of getting a full list of the users in the domain which my app is installed on.
What I've tried so far is adding the scope for the directory api https://www.googleapis.com/auth/admin.directory.user.readonly and calling the directory api, but this returns an error: Domain cannot use apis.
How can I list domain users?
Update:
After enabling Admin API in the domain management dashboard, I still get an error: Not Authorized to access this resource/api. This error doesn't happen when impersonating as the admin user, but I couldn't find a way of getting the admin's username, so I'm still stuck.
