I noted that when creating a user, you cannot specify the userName - it is assigned for you (in my case, I end up getting userName = email). If then modify username and email concurrently, things seem to be working out. However, if I modify only the userName, I get a success result, but nothing has changed (and in fact the user object returned still has the old userName`)
here's the request content
{"username":"MeganB","version":32}
and the response to the PATCH is (I omitted various attributes for brevity) - the response also contains an increated version, so I'm assuming something was updated.
I realize that being a cloud solution, usernames may require uniqueness globally, and thus usernames being in an email format may be required (you have this e.g. with the UserId on AzureAD) - but then shouldn't the PATCH be rejected?
Note that I'm specifically trying to use a userName that is not equal to the email
This sounds like a bug. The bug is likely that an error is being suppressed internally and is returning success instead of propagating it to the client as a 400 bad request. Please open a case with Genesys Cloud Care to report this.
Usernames are required to be email addresses. The PATCH returning success when it rejected any of your updates needs to be reported to Care as a bug.
By working out, you only mean getting a 200 successful response but it doesn't actually change the username or email, correct? I'm not able to change the values, but I do get a 200 anyway (the aforementioned bug).
I only tried changing userName and email concurrently until now... that appears to be working (I used the same new value for both), the return value from the PATCH contains the new value for both fields. If I change just the userName then I get HTTP 200 but nothing is changed.
I'm not able to replicate that behavior. I'm not able to change either username or email, neither together nor individually. I'd add that on for investigation when opening a case with Care about the other bugs.