Seaching from among users assigned to an app

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.