Username Special Character Retrieval Failures
Last Updated:
Overview
Okta Admins may be able to use their api/v1/users/{login} endpoint to retrieve usernames with special characters as long as they are encoded and escaped correctly; however, errors are thrown when testing with the characters below.
/
and/or
;
Errors thrown via API while testing:
{CTIC}FF;MIADER encoded as %7BCTIC%7DFF%3BMIADER – you will see an error message similar to “Not found: Resource not found: {CTIC}FF (User)” indicating that the login is getting cut off at the ; whether it is encoded or not.CTIC\FFM+IADER encoded as CTIC%5CFFM%2BIADER – escaped – CTIC\\FFM+IADER encoded as CTIC%5C%5CFFM% - you will either see “The endpoint does not support the provided HTTP method” or “HTTP Status 400 – Bad Request”.
When testing with the following encoding, no errors are thrown:
-
api/v1/users?search=profile.login eq "%7BCTIC%7DFF%3BMIADER" -
api/v1/users?search=profile.login eq "CTIC%5C%5CFFM%2BIADER"
Applies To
- URL encoding
- Percent-encoding
- Users API
Cause
Solution
Usernames with / will need to be searched with the associated user's UserId.
Usernames with a / character can only be fetched by id due to URL issues with escaping the / character.
The character ; is currently not supported when retrieving usernames.
