The API "Update application profile for assigned user" is returning a locale error

I need some help to check whether this is a bug in Okta. My request to update an app profile attribute for a user always results in an “invalid locale” error even if I am not passing the locale as a request attribute. Thank you.

API reference: Apps | Okta Developer


curl -v -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: SSWS ${api_token}" \
-d '{
      "profile": {
        "division": "sales"
}' ""


    "errorCode": "E0000001",
    "errorSummary": "Api validation failed: locale",
    "errorLink": "E0000001",
    "errorId": "oaeaqw4LAcyQUKipmzZnIQePw",
    "errorCauses": [
            "errorSummary": "locale: For property 'locale', format of value en_us is invalid. Valid values are concatenation of the ISO 639-1 two letter language code, an underscore, and the ISO 3166-1 2 letter country code"

Hello. I just tested it on my end and it’s working fine. Any chance you are routing the request through an API Gateway or some sort of Proxy?

Thanks for helping out, Cale! I tested it again from Postman Web to mitigate any gateway/proxy/ISP issues, but I am still getting the same error. Other 4xx errors are getting caught correctly (malformed body, invalid attributes, etc) but a correctly constructed request still throws the locale error for me. :worried:

Is there any place in the admin dashboard where locale settings can be toggled? But I again doubt if that matters, since this is API specific.

Hello Cale, I just saw that Okta is requiring the locale country code to always be in uppercase, but we seem to be using lowercase by default. Changes from our side fixed the issue !!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.