0

I am trying to query the Directory api for users with orgUnitPath=/ but not equal to any sub OUs.

I have read the following and it doesn't mention any "NOT EQUAL","!=", or "<>" operators. https://developers.google.com/admin-sdk/directory/v1/guides/search-users

Is there any way I can accomplish this?

Thanks

1 Answers1

0

"NOT EQUAL" is not part of the supported operators for the Directory API

So, unfortunately, your only option to list all users and then filter the "NON EQUAL" values programatically within your code.

ziganotschka
  • 25,866
  • 2
  • 16
  • 33
  • Thanks. This is what I am doing, but I was hoping for a more efficient way rather than looping through 100k records to find 10. Is there anywhere I can go to suggest a modification to the API? – Matthew Hynes Jun 14 '21 at 11:35
  • Yes! You can file a feature request on [Goole's Issue Tracker](https://issuetracker.google.com/). – ziganotschka Jun 14 '21 at 12:54