question

Izhar Mishli avatar image
Izhar Mishli asked

Getting PlayFabId (master id) with TitleId

I'm using PlayFab Party, and callback functions like OnRemotePlayerJoined have 2 parameters (object, PlayFabPlayer), I need to get the PlayFabId of the player that had just joined my network, but PlayFabPlayer holds a titleId, not a master id.

Player Dataentitiesmultiplayer
10 |1200

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

1 Answer

·
Seth Du avatar image
Seth Du answered

To be clear, “Title ID” is the ID of your title, while the “titleid” you have mentioned in the question is the ID of title player account, hence to get Master Player Account ID from Title Player Account ID. You may call GetProfile API or GetProfiles API and the Master Player Account ID is contained in property EntityChain.

4 comments
10 |1200

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

Izhar Mishli avatar image Izhar Mishli commented ·

Hello, thanks for your answer!

GetProfile API is not an option for me as it gives me a Permission Denied error. (I'm trying to get it for a different player, not for myself)

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Izhar Mishli commented ·

This behavior can be modified via Entity Policy, however, your requirement can be achieved via Cloud Script/Azure Function because it holds a title-level entity token in the running environment. In fact, it is preferred because you may filter other information and only returns master player account id in the callback result. It is more safe and convient.

1 Like 1 ·
Izhar Mishli avatar image Izhar Mishli Seth Du ♦ commented ·

Thanks for answering again!

That sounds great! From my little experience with the cloud script, I was only able to execute, not to properly return values, how do I return a value? And where is the title-level entity held? Would you please share an example of how a handler like this would look like? Thank you!

0 Likes 0 ·
Show more comments

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.