
BillS.23320 (Customer) asked a question.
I have no issues with this search:
https://my.okta.com/api/v1/users?search=profile.login eq "test@test.com" and profile.lastName eq "smith"
but I get "Invalid search syntax." when I try to do a not equal on the lastname.
https://my.okta.com/api/v1/users?search=profile.login eq "test@test.com" and profile.lastName ne "smith"
According to this:
https://support.okta.com/help/s/article/What-Operators-are-Supported-by-Okta-Rest-API?language=en_US
ne is a supported operation.
am I missing something here?
Thank you.

Hi! Yes - this one is tricky. Please reference this doc: Core Okta API - Operators
Here the following is stated: Note: The ne (not equal) operator isn't supported for some objects, but you can obtain the same result by using "lt ... or ... gt". For example, to see all user agents except for "iOS", use (client.userAgent.os lt "iOS" or client.userAgent.os gt "iOS").
So in your example, try out the following:
https://my.okta.com/api/v1/users?search=profile.login eq "test@test.com" and (profile.lastName lt "smith" or profile.lastName gt "smith")
In my own testing, this both worked and gave me the expected result. Thanks!