Searching user by Zendesk ID - not working properly. | Community
Skip to main content

Searching user by Zendesk ID - not working properly.

  • August 31, 2018
  • 7 replies
  • 0 views

Hello,

Some of my scripts using search users by Zendesk User ID as documented at:

https://support.zendesk.com/hc/en-us/articles/203663216-Searching-users-groups-and-organizations#topic_duj_sbb_vc

"The user and type keywords 
To search for a user's profile data, you have the following two options. 
Using the user keyword: 
user:amy 
Or, using the type:user keyword: 
type:user amy 
What's the difference between the two? The keyword user when not combined with type is just a shortcut for finding users by ID, name, and email address. The user keyword, like the ticket user role keywords (assignee, requester, submitter), accepts the ID, name, and email address as valid user identifiers. 
user:52789480 

And it was working fine until June 2018. Then something was changed and now I cannot retrieve users by ID.

Examples:

curl "https://alitungsten.zendesk.com/api/v2/search.json" -G --data-urlencode "query=type:user user:367396768391" -v -u --tlsv1.2

Will return empty array, so it is not working.

However, all other searches by name, email etc. are working fine, so

curl https://alitungsten.zendesk.com/api/v2/search.json -G --data-urlencode "query=type:user" -v -u 

will return all users

curl https://alitungsten.zendesk.com/api/v2/search.json" -G --data-urlencode "query=type:user name:Karl159" -v -u 
Returns data for user Karl159.

and so on.

Please if anyone knows how to search by user ID or it's a bug - let me know.

 

Thanks!

7 replies

  • August 31, 2018

Hi Al. Just wondering -- why not use the Users API directly?

GET /api/v2/users/{id}.json

 


  • Author
  • August 31, 2018

Hi Bryan,

Thanks for reply - I've tried this a couple of days ago - worked indeed, but to use it will require rebuilding script logic.

So have you guys deprecated user search by ID? Anywhere I can find more info on this, changelog?

Thanks!


  • September 10, 2018

Let me amend what I wrote -- I did find this reference under "The user and type keywords" section:

>>>>>>>

The keyword user when not combined with type is just a shortcut for finding users by ID, name, and email address. The user keyword, like the ticket user role keywords (assignee, requester, submitter), accepts the ID, name, and email address as valid user identifiers.
user:52789480
user:amy
user:"amy moore"
user:amy@mondocam.com

<<<<<<<

I'm going to look into this and get back to you.


  • September 11, 2018

Hi Al. Apologies for the runaround on this. This is indeed an issue and our engineering team knows about it.

I'm going to create a new ticket under your account, so when it's addressed, you'll get notified.

Unfortunately, despite the team here knowing about it, I can't say exactly when it will be addressed. I'll cc myself on the ticket, so if you have any questions or follow-up, I'll be notified. Thanks for your patience.


  • Author
  • September 12, 2018

Thanks Bryan,

I implemented temp. solution using findMany(), but will be great to know how it goes with search()->find() using user IDs so I can revert to original logic.

Al.


  • October 4, 2018

Hi Bryan,

Our team is also hoping to utilize this feature in one of our integrations.

If possible, could you also create a ticket under my account and send me a notification once it's addressed?

Thank you!


  • October 18, 2018

Hi Ricardo. A ticket has been created under your name. Check your email for a reference to it. When this issue is resolved, you'll be notified. Thanks for your patience.

And thanks again Al for raising the issue to begin with!