Search code examples
google-apigoogle-contacts-api

How to get Google API access to company directory without being super admin?


See screenshot of what I see as a user in Gmail: enter image description here

Is there a way to get programatic access to this list w/o needing super admin access? I already saw the API https://developers.google.com/admin-sdk/directory/v1/reference/users/list but it requires super admin level access to access it. If I query it as a user I get "403: Not Authorized to access this resource/api".

Is there a scope I can ask for so a user can get access to the company directory?


Solution

  • For non admin, you have to use the parameter "viewType=domain_public" so the users can access to this information. Keep in mind that for this parameter to work, the contact sharing options should be enabled.
    To check for this options, in Admin Console go to "Apps > Google Apps > Contacts > Sharing Settings" Check if this works for you.