Hi. I have this feature in my game where users can search for other user based on their username (not playfabId) and find their profile, before adding them as friend.
The problem I am facing now is that, since the user only input username, I'm unable to get other information about the user, such as its avatar url (which I need to display the profile pic to my current user, so he know who he is searching for)
The workaround I have is using
PlayFabClientAPI.GetAccountInfo(new GetAccountInfoRequest { Username = searchField.text // Search field is the text the user enters }
and in my json configuration, I allow the current user to actually access other user's information with a rule, so I can get the account info of a random user (as long as the username matches).
The problem here is that, I would need to make another call to get the avatar URL (through GetPlayerProfile) using the playfab id I've received in this case.
To summarize, I can find a way around it, but it seems quite inefficient as I'm making multiple calls and potentially introducing a security risk.
Are there any solution to this?