Players:GetUserIdFromNameAsync() Errors With Some Past Usernames

There appears to be an issue with the Players:GetUserIdFromNameAsync() function, which started occurring a few days ago. When trying to retrieve a user ID by passing a past username of a player, the function sometimes returns an “Unknown user” error. This is inconsistent as it does not happen for all past usernames.

For example, this user has two past usernames: ‘jessie_inlove1’ and ‘JJess1caD’. When ‘jessie_inlove1’ is passed to Players:GetUserIdFromNameAsync(), it correctly returns the user ID. However, when ‘JJess1caD’ is used, it results in an “Unknown user” error, as shown in the screenshot attached. This issue is not isolated to this user alone; other affected usernames include ‘vvIiamm’, ‘Jxnaqssh’, and ‘The_Robloxian1257’.

The expected behavior is for the function to return the correct user ID regardless of whether the current or a past username is provided, provided that the username belonged to the user at some point. This is how it worked a few days ago before this issue began occurring. The current inconsistent behavior is affecting features that rely on historical data or user tracking across username changes.

Reproduction Steps:

  1. Open a Roblox Studio session.
  2. Execute the Players:GetUserIdFromNameAsync() function with a past username that has been changed.
  3. Note that certain past usernames return the user ID correctly, while others return an “Unknown user” error.

Expected Behavior:

The function should consistently return the user ID for all past usernames of a player, as well as current ones.

Temporary Fix:

3 Likes

This is also occurring every now and then with current and up-to-date usernames as well. It always occurs with the same players, repeatedly.

1 Like

Seems related with a recent change to the https://users.roblox.com/v1/usernames/users API where each requestedUsername in the response are now all lowercase. A temp fix (which seems to work here) is requesting the old username in all lowercase

3 Likes

Thanks Julia - very valuable info. :slightly_smiling_face:

Can confirm this works as a temporary fix.

1 Like

Found someone for this one! We’ll get back to you when we have an update. Thanks for the report :slight_smile:

3 Likes

This issue was seemingly resolved around 6 hours ago. Thanks a lot! :smile:

2 Likes

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