getUser() returns 400 for certain special characters

I’m using the Java Okta SDK to create and retrieve users from our tenant. The tenant is configured such that the username has no restrictions on its format.
There are multiple special characters that can be created using UserApi / UserBuilder but when retrieved using UserApi.getUser() a 400 (bad request) is thrown.
So far in testing the following special characters can be included in a username but not retrieved:
opening square bracket, closing square bracket, backslash
There are others too but I’ve still got narrow down exactly which they are.

Some questions:

  • Is there a reason for this behaviour?
  • Is there a workaround/solution to solve this?
  • Is there a definitive list of special characters that exhibit this behaviour?

Hi @mdowman thanks for this, I am checking something on my side and shall update soon.