/api/v1/users API case sensitivity Skip to main content
https://support.okta.com/help/answers?id=9062a000000quipqa0&refurl=http%3a%2f%2fsupport.okta.com%2fhelp%2fanswers
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
1
2
3
4
5
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
Alex Beynenson (admin)Alex Beynenson (admin) 

/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

{"profile":{"login":"user@gmail.com","email":"user@example.com","firstName":"?","lastName":"?"},"credentials":{"password":{"value":"(snip)"}}}

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

https://developer.okta.com/docs/api/resources/users.html#get-user
GET {org}/api/v1/users/{username}

-Matt
Alex Beynenson (admin)Alex Beynenson (admin)
Thanks for clarification.