Reputation: 21
I am trying to run a query in our instance of okta using postman. The problem I am running into is that Postman says it has syntax errors. Exact wording "Invalid search criteria.". Here is a partial copy copy of my structure:
{
"id": "00u1c9lvdpsArq00J0h8",
"status": "ACTIVE",
"created": "2017-02-28T18:55:23.000Z",
"activated": "2017-02-28T18:55:24.000Z",
"statusChanged": "2017-02-28T18:55:24.000Z",
"lastLogin": null,
"lastUpdated": "2017-05-01T10:30:59.000Z",
"passwordChanged": null,
"profile": {
"login": "[email protected]",
"firstName": "Lynn",
"lastName": "Harvey",
"mobilePhone": null,
"email": "[email protected]",
"secondEmail": null,
"primaryPhone": "4169329890"
},
"credentials": {
"provider": {
"type": "ACTIVE_DIRECTORY",
"name": "idm.sni"
}
},
The query I am trying to run is {{url}}/api/v1/users?search=credentials.provider.name eq "idm.sni"
If anyone has any suggestion I would greatly appreciate the help.
Upvotes: 1
Views: 1859
Reputation: 23
Per the documentation, you can't search on credentials.provider.name
Upvotes: 0
Reputation: 4903
The search expression needs to be URL encoded, an example can be found here: http://developer.okta.com/docs/api/resources/users.html#list-users-with-search
So in your example, the request URL would need to look like {{url}}/api/v1/users?search=credentials.provider.name%20eq%20%22idm.sni%22
.
I hope this helps!
Upvotes: 2