apps-script-samples icon indicating copy to clipboard operation
apps-script-samples copied to clipboard

Can we get the results with different user names in query - G suite admin sdk Directory API - users.list API

Open AnilRo-Kore opened this issue 8 years ago • 1 comments

Expected Behavior

Want to get the results with for name John , Adam, Rohan at a once with (multiple names at once to api).

Sample URL: trying with this api

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

https://developers.google.com/admin-sdk/directory/v1/guides/search-users?update_high_contrast=true&authuser=0 Description:

  1. Im able to give single query clause for search users for example query=name:John*
  2. query=name:'hari*' email:'hari*' (tried this both name and email fields it worked)

AS per the docs multiple clauses should work. But as per my requirement trying with multiple names with query query=name:John* name:Rohan* name:Adam* it didn't help me out.

Do I need to make this API call for each users or can I use query field to get different usrs at once with API

Actual Behavior

query=name:John* (with Single user name is working) Need to get the results of different users at once with API.

Steps to Reproduce the Problem

  1. https://developers.google.com/admin-sdk/directory/v1/reference/users/list
  2. query=name:John* (this worked)
  3. query=name:John* name:Rohan* name:Adam* (Want to get different users data with query)
  4. Passing the query like this in above url

AnilRo-Kore avatar Oct 18 '18 02:10 AnilRo-Kore

This issue tracker is for reporting bugs in our sample code. For general Q&A about the Directory API, please see the support page for options:

https://developers.google.com/admin-sdk/directory/support

erickoledadevrel avatar Oct 18 '18 15:10 erickoledadevrel