question

Darius Vu avatar image
Darius Vu asked

How do we make the family group?

Dear team,

I am developing the function "Create Family Group" in our app. Parents can create the Family Group and add their kids as the members. And Parents can access kid's data by using Kid's Playfab ID to call Playfab Admin API through Azure Function Cloudscript.

But I have the questions as below.

1. How do I send the link invitation or family code invitation to other members to invite them to join group?

2. How do I make the role in the group for each member? For example, mother creates the group and invite father as the admin and invite their Kids as the members.

3. Can the admin of group get Playfab IDs of each member in the group? For example, both mother and father can access kid's data through Playfab ID of kids? Kid cannot access data of each member in the group.

Thank you so much for your help.

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

You may refer to the Entity Group documentation on:

https://docs.microsoft.com/en-us/gaming/playfab/features/social/groups/quickstart

  1. Entity Group has invitation/application feature, administer can send invitation to target players and clients can call ListGroupInvitations to retrieve data.
  2. Entity Group can create different roles, by default, there are Admins and Members.
  3. Some permission requirements can be modified via Group Entity Policy. Meanwhile, the policy should be limited to the single Group. “Kid cannot access data of each member in the group.” is unclear to us. It depends on what data you don’t want kids to access. Is it Members list? If it is some shared data in the entity group. I will suggest using Group(Entity) Objects to store the data, and you may add policy like below in the Policy Tab of Group:

{

"Action": "Read",

"Effect": "Deny",

"Resource": "pfrn:group--*!*/Objects/*",

"Principal": {

"MemberOf": {

"RoleId": "members" //your own defined role

}

},

"Comment": "deny members role of the group to read objects in the group",

"Condition": null

},

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

Darius Vu avatar image Darius Vu commented ·

Thank you so much for your help.

Could you fix the link reference to help me? And I also referred the documents in here:

https://docs.microsoft.com/en-us/gaming/playfab/features/social/groups/quickstart

But I don't understand how to create the EntityKey For example, when an user creates the group then they must put the group name and unique entity key? or entityKey is generated automatically from server?

For question 3, can the admin of group get Playfab IDs of each member in the group? Because I want to set parents are as the admins and kids are as members of group. And admins (parents) can access member's (kid's) data by using Playfab ID to call Playfab Admin API through Azure Function Cloudscript. Is it possible? If yes, how does an admin get Playfab IDs of each member in the group?

public void CreateGroup(string groupName, EntityKey entityKey)
{
	// A player-controlled entity creates a new group
	var request = new CreateGroupRequest { GroupName = groupName, Entity = 	entityKey };
	PlayFabGroupsAPI.CreateGroup(request, OnCreateGroup, OnSharedError);
}<br>
0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Darius Vu commented ·

Group Entity Key is unique in a title and is created by PlayFab, it is returned by the CreateGroup on success callback.

By default, admin can access any data in a group, including member list, simply via ListGroupMembers API call.

0 Likes 0 ·
Darius Vu avatar image Darius Vu Seth Du ♦ commented ·

I checked ListGroupMembers API, the function responses the EntityMemberRole as below:

So how do we get the member account information as playfab ID, displayname... of members on the group?

Thank you so much.

0 Likes 0 ·
capture1.png (10.1 KiB)
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.