/api/v1/users API case sensitivity Skip to main content
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
Alex BeynensonAlex Beynenson 

/api/v1/users API case sensitivity

There is some inconsistency with how the users API handles the casing of profile.login for filtering versus creating new users.

I have an existing user in my org with login of User@example.com and I'm building up some API requests to work with that user as user@example.com

Here's a session for trying to find  user, not finding, but failing when user is being created.

GET https://example.oktapreview.com/api/v1/users?limit=1&filter=profile.login%20eq%20%22user@example.com%22 HTTP/1.1
Authorization: SSWS (snip)
Accept: application/json
Host: example.oktapreview.com

HTTP/1.1 200 OK
(snip headers)



POST https://example.oktapreview.com/api/v1/users?activate=False HTTP/1.1
Authorization: SSWS (snip)
Accept: application/json
Content-Type: application/json; charset=utf-8
Host: example.oktapreview.com


HTTP/1.1 400 Bad Request
(headers snip) 

{"errorCode":"E0000001","errorSummary":"Api validation failed: login","errorLink":"E0000001","errorId":"oaeBPlwzzB_QNGk7KjLslUO2Q","errorCauses":[{"errorSummary":"login: An object with this field already exists in the current organization"}]}

It would be nice if either GET/filter were not case sensitive or POST were.
Ciprian SamihaianCiprian Samihaian (Okta, Inc.)
GET is a case sensitive search. It can't be made insensitive. 
Matt EganMatt Egan (Okta, Inc.)
Hi Alex, I would suggest using this method to find a user to overcome the case senstive nature

GET {org}/api/v1/users/{username}

Alex BeynensonAlex Beynenson
Thanks for clarification.