Question

An organization in Google Apps can have multiple domains.

API requests to the Admin SDK require the domain name as a parameter. Ex:

https://apps-apis.google.com/a/feeds/domain/2.0/{domainName}/general/defaultLanguage

Is there a way to programatically list all domains for an organization? If, for example, you wanted to change the lanaguage for all domains in an organization, there doesn't seem to be any way to list/iterate through the domains.

Was it helpful?

Solution

You cannot set separate policies or Admin Settings API per a domain when the domains are in the same Google Apps instance. See the Google Limitations for multiple domains document.

To answer your first question, the Admin SDK does not have a method that allows the retrieval of all domains. However, you can retrieve all users in the Google Apps instance and use that to determine what domains users have been created in.

OTHER TIPS

In the new version of Directory API, Google added a functionality called Domains that let you get the domain list of a customer.

Check the below link

https://developers.google.com/admin-sdk/directory/v1/reference/domains

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top