okta api filter and search not working Skip to main content
https://support.okta.com/help/answers?id=9062a000000quhvqak&refurl=http%3a%2f%2fsupport.okta.com%2fhelp%2fanswers
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
1
2
3
4
5
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
Sean BoyceSean Boyce 

okta api filter and search not working

We have the following code that we are using to call the okta api and it is not factoring in the search parameter.  Instead we simply get back all of the users in okta.

I was trying to follow the convention stated here, but no change: https://developer.okta.com/docs/api/resources/users.html#list-users-with-search

Any idea?

OktaClient.prototype.getUsers = function(search, done) {
    const search = encodeURIComponent('search=profile.lastName eq "org_profile"');
    this._client.users.list(search, true, (users) => {
        if(!users.success){
            return done({userMessage:parseErrorResult(users)});
        }
        return done(null, users.resp);
    });
};
Marian ChirvasaMarian Chirvasa (Okta, Inc.)
Thank you for reaching out to Okta Support, my name is Marian and I will be assisting you with this case.
I have opened another internal ticket regarding this issue as needs more troubleshooting and cannot be solved on the community page. New case no: 00329837