Nextcloud OCS username is case sensitiv

So I am currently experimenting with Nextcloud. I found out that https://cloud.example/ocs/v1.php/cloud/users/tommy will not work, but https://cloud.example/ocs/v1.php/cloud/users/Tommy does. Logging in normally and in API requests is possible with both Uppercase and lowercase username.
Any way to get the username in the correct writing? Any method is accepted, I just need/want to get the full name of an user via the API.