Pulling the appId from AD-sourced integration ( I am querying Okta), I am trying to search within that collection of users (i.e., those assigned to that particular app) for a particular user with a specific last name. In other words, I want to return all users whose last name is Stone that is part of the appId I have set in my global variable. Here is the query I have developed,
The problem is that it retrieves users who have “Stone” in the managerDn. I don’t want this, I want only users whose last name is “Stone”. How do I revise my query to accomplish that?
I don’t think the authentication is invalid. Using the same environment variables, I can query the Okta tenant just fine with other queries. As such, I think the above query is malformed.
Filter is also a valid option provided in their documentation. So that should work as well. And the endpoint is a bit different here, so I believe you have some customizations for internal usage?
Because I tried to import the OKTA collections into my workspace and I see the below for search operation.
What you’re missing is that I am taking the users assigned to an app and then searching among those for a particular last name. Your query searches for all users in an Okta tenant for a particular department.
For example, here is a valid query for all the users assigned to a particular app (if you place the id into the appId environment variable).
{{url}}/api/v1/apps/{{appId}}/users
I wish to then search from that set of users for one with a matching lastName.