question

capricornum avatar image
capricornum asked

Change default role in group to admin

Dear Community,

I am using PlayFab in my Unity Project.

I would like to create a group in which there are only admins. Or in which the default role for new members is admin. So that when the creator of the group leaves the group, others still have the ability to delete the group.

Could you please give me a hint as to how to accomplish this?

Thank you.

apisunity3dentities
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

·
Sarah Zhang avatar image
Sarah Zhang answered

The Administrator and Members are both default roles of the PlayFab Group. It’s unable to delete one of them. You can set the RoleId for Group members manually. When you use API AddMembers to add members to the group, you can specify the RoleId for them, if you set it as admin, the new group member would be the administrator. Besides, you can also use this API ChangeMemberRole to change the group members’ roles.

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

capricornum avatar image capricornum commented ·

Hi Sarah, thank you very much for your reply.

Just to clarify, if I use AddMembers and manually specify the RoleId for the new member as admin, will both the creator of the group and the new member be administrators? Or just the new member?

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang capricornum commented ·

Yes, they would all be administrators. Admin is the default role of the creator. It won't be changed. One group can own multiple administrators.

1 Like 1 ·
capricornum avatar image capricornum Sarah Zhang commented ·

Thank you.

0 Likes 0 ·

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.