Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by Jurica Adamek · May 15, 2019 at 12:22 PM · Matchmakingentities

Getting DisplayName from Entity Id in a match

Hello,

I would like to get the DisplayNames of all players in a Match.

I am doing matchmaking via PlayFabMultiplayerAPI.GetMatch.
When I get the result, I can access all the members in the match. Every member has its Entity.
When I call PlayFabProfilesAPI.GetProfile with an entity, I get error "NotAuthorized". I am authenticated in the game with PlayFab account using PlayFabClientAPI.LoginWithPlayFab.

Am I doing something wrong or can I enable this in the Game Manager?

The code if it helps: https://monosnap.com/file/tHgOb0kFwkTcgBu3s0IFSkyaSIgWgb

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by jital · May 15, 2019 at 04:41 PM

Hello,

Can you check inside your Game Manager, go to Settings->Client Profile Options, and verify the "Display Name" is checked under "Allow Client Access to Profile Properties".

Comment

People who like this

0 Show 4 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Jurica Adamek · May 16, 2019 at 06:17 AM 0
Share

Yes, it is indeed checked.
I tried to run the code with all the access permissions checked, still getting "NotAuthorized" error.

avatar image jital ♦ Jurica Adamek · May 16, 2019 at 09:35 PM 0
Share

I tried to reproduce your issue using the PlayFabProfilesAPI.GetProfile call, but I did not get the same error, I received null.

Is there a specific reason you need to use PlayFabProfilesAPI.GetProfile? Can you trying using PlayFabClientAPI.GetPlayerProfile instead?

I believe the issue lies somewhere in manually creating and editing the Entity Key. I will look more into this to see if I am correct.

avatar image Jurica Adamek jital ♦ · May 17, 2019 at 06:02 AM 0
Share

To call PlayFabClientAPI.GetPlayerProfile I need PlayfabId. The GetMatch call returns GetMatchResult and in that structure, I get match members with EntityKeys and not PlayfabIds. Is there an API to convert EntityKey to PlayfabId if the entity is player?

As you said, its probably the manual creation of EntityKey, but Im not sure how else to get DisplayNames in a match.

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    3 People are following this question.

    avatar image avatar image avatar image

    Related Questions

    How do You form the Creator key correctly? (via UE4 blueprints) 1 Answer

    How would I use match-making (preview) for my game ? 1 Answer

    Matching with other players, 1 Answer

    Entity Global Title Policy for weaker bans 1 Answer

    Direct Challenges,Direct Challenges (via FB) 2 Answers

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges