I've faced strange behaviour of add user to restrictions dialog.
Source for drop-down user picker list is this url:
https://confluenceurl/rest/prototype/1/search/user-or-group.json?max-results=6&query=TERM&_=1653574329076
request to this url with username in term returns not empty result (as user found) but it contains wrong userkey value - it can't be found on database
On other hand request to https://confluenceurl/rest/api/user?username=TERM returns corrent user object with correct userkey that could be found in DB.
So, somewhere in system (bot in db) there is wrong key to user mapping and first endpoint returns this value.
Only one user seems to have this problem. I've tryed to remove it from users (it's AD synchronized) and delete unsincronized user after - but it didn't helped.
Rebuiding content index from scratch helped:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.