Possible API bug?

I am using  GET: https://my.support.domain/TDWebApi/api/people/lookup?searchText={{userEMPLID}}&maxResults=1

To return the user with Organizational ID = userEMPLID above

When I send my userEMPLID it returns a different user.  I checked and found that the user returned has an Organizational ID (userEMPLID) similar to mine, but it is not identical.

e.g. not the actual userEMPLID numbers but here is the similarity: 

GET userEMPLID 000123456

Response Body userEMPLID 001234567

Does that make sense?

Asked by Scott Cory on Tue 1/24/23 7:33 PM
Sign In to leave feedback or contribute an answer

Answer (1)

Mark Sayers Wed 1/25/23 9:33 AM

Hi Scott,

This is exactly fully expected. It is a "LIKE" search, not an exact match, which equates to an SQL LIKE wildcarded on each side of the search phrase.

So anything that contains the phrase being searched should return.

Mark Sayers
Sr Support Consultant, CS

No feedback
Is there any way we can force it to be an exact match? I am still trying to update the Requestor of a ticket and in the Description field of the ticket created by the email monitor receiving the BeyondTrust Outbound Event, we only have the email address and Organization ID. - Scott Cory Wed 1/25/23 10:52 AM
Unfortunately at this time it isn't possible to force it to exact match a search phrase at that endpoint. - Mark Sayers Wed 1/25/23 10:55 AM
Is there any other way to accomplish this? All of the tickets created from the BeyondTrust chat support outbound events are received from a generic email address as the Requestor. We want the Requestor to be the user that we were chatting with, hence the need to Patch the ticket somehow after it is created. - Scott Cory Wed 1/25/23 11:04 AM
I'm sure iPaaS could do it in a better/more accurate way for you, or you could maybe initiate webhooks and receive them in some system/app that you custom build to parse tickets, make a search call, and use the data from the person object result that is an exact match to pull their UID and PATCH the ticket. - Mark Sayers Wed 1/25/23 11:16 AM
Thanks Mark, when you say "make a search call", is that a different endpoint than https://my.support.domain/TDWebApi/api/people/lookup? - Scott Cory Wed 1/25/23 11:23 AM
No, I'm referring to the call you have already been attempting, sorry, should have been clear there. - Mark Sayers Wed 1/25/23 11:58 AM
So with this call:
GET: https://my.support.domain/TDWebApi/api/people/lookup?searchText={{userEMPLID}}&maxResults=1

What would we search for instead of the exact Organization ID or email address to find the correct UID?
- Scott Cory Wed 1/25/23 12:02 PM
Email address is generally *supposed* to be 100% unique per user (otherwise you open yourself to wonky behavior in TDX as concerning notifications), so that ought to be the safest thing to search potentially. - Mark Sayers Wed 1/25/23 12:08 PM
Thanks, we were hoping to user the Organizational ID since that is 100% unique for our users. The email address they enter in a chat session is not always their campus email address that we have loaded in TeamDynamix. I will give that a shot though to see if we can at least update some of the Requestors. - Scott Cory Wed 1/25/23 12:13 PM