Configuration needed to query users from a Google Apps domain

To query Google Apps domain users, you need to enable the following:

  1. An administrator of a Google Apps domain needs to login to the Google Admin console, go to Security, select API Reference and check "Enable API Access".

  1. The owner of the Client ID (the developer of the application) on Google API Console needs to enable the Admin SDK API.