question

Alberto avatar image
Alberto asked

How can I get the PlayFabId of a player by its DisplayName in CloudScript?

I have a system where you can either search for another player by PlayFabId or DisplayName.

In the client, I use GetAccountInfo for both cases, but I'm missing an equivalent method in the server side.
Is there a way to search for a player by its DisplayName in the server?

Thank you

CloudScriptFriends
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Citrus Yan avatar image
Citrus Yan answered

We do have a equivalent Admin API GetUserAccountInfo for this, however, it’s not added into CloudScript’s environment hence you cannot directly call that from it. A workaround for this would be using Azure Functions instead, where you can access all the API sets.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Alberto avatar image
Alberto answered

Is there any reason for not adding it to CloudScript's environment?

I rather not use Azure Functions, they cost extra and the friction of learning a new technology with a game already in development would be too much for the team

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Citrus Yan avatar image Citrus Yan commented ·

Admin API Set is used for title management purposes hence it's not added into CloudScript's environment.

One thing forgot to mention is that you can call Server API GetUserAccountInfo in CloudScript, however it only support searching for a player by its PlayFabID. May I know are there any business impact for not being able to search for a player by its DisplayName in CloudScript?

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]