0

Quandry

When making a call to User GET in the Google Admin SDK's Directory API through the JVM client, null is a valid value for orgUnitPath according to documentation, but I can find no information on what this value implies about a user's position in the organisation.

What does a null value for this field mean? Our working assumption is that it is synonymous with the root organisation, but we have no supporting evidence for this theory, and we'd rather not guess what it means.

Attempt to Replicate

I have attempted to replicate this behaviour on a test Google Apps instance by patching a user through the API explorer with { "orgUnitPath": null }, but the UserResource that comes back (from the PATCH and from subsequent GETs) has the (expected) value of { "orgUnitPath": "/" }.

Background

We currently map null on this field to an error (since we are dependent on orgUnitPath for our logic). This has never come up for us in the past, but a problem arose today in a production environment when we encountered a null value on the field and logged an error. We could recycle our token to look more closely at the user to figure out what the null value implies, but we're reluctant to do so, as to respect our client's privacy we would want to reach out to them to do so. Since this is ultimately a result of an absence of documentation, I'm hoping to get a definitive response here on what the value means so we can handle it correctly in future.

Community
  • 1
  • 1
mirichan
  • 1,370
  • 1
  • 12
  • 25
  • What do you mean by "null is a valid value for orgUnitPath according to documentation"? Can you give me the link of documentation in where you get that information. – KENdi Aug 24 '16 at 07:54
  • https://developers.google.com/resources/api-libraries/documentation/admin/directory_v1/java/latest/com/google/api/services/admin/directory/model/User.html#getOrgUnitPath() – mirichan Aug 25 '16 at 02:32
  • It is clearly stated there that if the value is null then it means none. I think you misunderstood that value. Check this [user accounts](https://developers.google.com/admin-sdk/directory/v1/guides/manage-users#update_user) and [orgunits](https://developers.google.com/admin-sdk/directory/v1/reference/orgunits) to know more about it. – KENdi Aug 25 '16 at 08:56
  • Yes. It means none. And my question is "what does that imply about the user's position in the organisation?", because I disagree that it is even remotely clear. I'm yet to read anything that suggests it's possible to remove the root orgunit. It certainly seems perverse that it should be possible. – mirichan Aug 26 '16 at 00:45

0 Answers0