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.
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.
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.
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)
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.
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!
2 People are following this question.