Okta Search API Requests That Use a Single Character Return 500 Internal Server Error
Last Updated:
Overview
An Internal Server Error might occur when a Search API request uses the Starts With (sw) operator with only a single character as the value. In such a case, an HTTP 500 response may be returned for the request and the following error code in the API response body:
errorCode E0000009
Applies To
-
Okta Users API
- Groups API
- Search API
Cause
This issue occurs when using the Starts With (sw) operator in a List Search API request. A single-character search results in poor performance. The API query may fail and return an error because the request reaches a timeout.
Depending on environmental conditions, this may occur intermittently or later succeed on subsequent requests.
Solution
Ensure that the search queries using the Starts With operator contain more than one character when using the /api/v1/users?search endpoint to avoid the timeout error.
In the future, the Okta API may return an error for any Starts With search that does not meet the minimum characters due to these performance issues. The 400 Bad Request error would be returned as is presently the case for the contains (co) operator, which requires a minimum of 3 characters for Search.
