Configuration to Query Users from a Google Apps domain

In order to be able to query Google Apps domain users, you must enable API access:

  1. An administrator of a Google Apps domain needs to login to the Google Apps Admin console, then select Security.

Google Admin Console

  1. Check Enable API access.

Google Apps API Reference

Additional Resources: Google Apps Admin SDK

Enable API access in the Admin console