Reputation: 2381
I am trying to get the organization name of root organization. However in the below API, I cannot send orgUnitPath as empty.
https://developers.google.com/admin-sdk/directory/v1/reference/orgunits/get
Any idea on how to achieve this?
Upvotes: 1
Views: 2685
Reputation: 41
Old topic, but I might just as well answer, as I was looking myself. You can get the root OU, in at least one way, it's not pretty, but it works.
First you use Orgunits: list to get a complete list of the units. The you loop through them until you find a unit with parentPath="/". Then you take the parentId of that unit and do a Orgunits: get using said "parentId" as "orgUnitPath".
Voila... /Adam
Upvotes: 4
Reputation: 13528
The root org is always named '/' via the API no matter what it's called in the Control Panel.
Upvotes: 3