question

Brian Jensen avatar image
Brian Jensen asked

GetEntityProfiles not returning DisplayName

{
    "Action": "Read",
    "Effect": "Allow",
    "Resource": "pfrn:data--*",
    "Principal": "*",
    "Comment": null,
    "Condition": null
}

I couldn't figure out the Resource string required to get just profiles this is what I came up with so that GetProfiles would work. (What would be more appropriate or where can I find this info myself?)

PlayFabProfilesAPI.GetProfiles is returning the requested accounts but the displayName and character ID returned for the accounts is empty.

Client Profile Options are set to allow these.

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.

Brian Jensen avatar image Brian Jensen commented ·

Only thing I could think of at this point is to force the "DisplayNameOfAdmin-GroupName" for every group. This way, for a friends list, the GroupName contains the DisplayName of the admin.

However I'd still like to know how to get the display names using GetProfiles

0 Likes 0 ·
Sarah Zhang avatar image
Sarah Zhang answered

We have tested GetProfiles() with title entity token. Title token should have full access to entities in this title. We are unable to get DisplayName too. In another thread, someone posted a similar question. At that time, this feature has not been released yet. Now it seems to have not updated yet. Please keep an eye on it. A possible workaround is to save the DisplayName in an entity Object, then use SetObjects and GetProfiles to access it.

6 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.

Brian Jensen avatar image Brian Jensen commented ·

Thank you. I'll keep an eye on it.

0 Likes 0 ·
kennyroy avatar image kennyroy Brian Jensen commented ·

What exactly is wrong with doing GetProfile on each entity in a group?

0 Likes 0 ·
Brian Jensen avatar image Brian Jensen kennyroy commented ·

Groups can be 1000 members at max. Using that example grabbing 25 at a time limited to 4 API calls per second. Will require 10( 1 second per 100 members) seconds of capped API calls for each player. Exceeding the limit can get your game throttled or even banned.

0 Likes 0 ·
Show more comments
kennyroy avatar image kennyroy commented ·

Where are we at with this? I need DisplayName in GetProfiles too. Like yesterday. I'm trying to launch beta next week.

0 Likes 0 ·
Johan de Bruin avatar image Johan de Bruin commented ·

Is this still not working? I'm also trying to get a list of displayNames and avatarUrl from this specific resource but these are returning empty (I get other stuff like the player master id).

I'm using PlayFabProfilesAPI.GetProfiles in the UnitySDK

0 Likes 0 ·
Brian Jensen avatar image
Brian Jensen answered

Lack of this feature is why I dropped playfab.

2 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.

Johan de Bruin avatar image Johan de Bruin commented ·

Did you found a better alternative? Playfab still saves us a lot of development time.

I'm thinking about different workarounds, having a small cosmosDB with all the player's display name information, and just call an azure function through cloud script.

0 Likes 0 ·
Brian Jensen avatar image Brian Jensen Johan de Bruin commented ·

No. I looked at how they were doing stuff and learned extrapolated how to do it myself then proceeded to learn Node.js and javascript and started work on my own system. I'll do a little more work but so far it isn't really that much work. I have not worked with cloud scripts but that is an easy solution to the problem for sure. At the time of learning Playfab I didn't know anything about javascript. Now I can write entire back-end services and API's with it. I'm sure if I came back to Playfab creating my own cloud script implementation wouldn't be a problem. BUT...That one weird use case made me think. If they missed this, what other things did they conveniently miss as well?

0 Likes 0 ·
Johan de Bruin avatar image
Johan de Bruin answered

I found a workaround using objects. What I do is when the player updates their avatar or display name I expose that information in an entity object. GetProfiles exposes the player objects so I'm able to get that information (plus some extra) from there.

This is the snnipet that I used (profile is one of the profile results):

if (profile.Objects != null && profile.Objects.ContainsKey("ProfileObject"))
{
    var dataObjectString = profile.Objects["ProfileObject"].EscapedDataObject;
    var profileObject = JsonUtility.FromJson<ProfileObjectDTO>(dataObjectString);
...
10 |1200

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

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.