question

Thiago Trennepohl avatar image
Thiago Trennepohl asked

Can I copy user permissions from one title to another?

We have a bunch of users and a bunch of different titles, assigning the same role to a user in every title takes ages.

Is there an API or some other automation to improve this situation?

sdkssupportgame manager
10 |1200

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

Thiago Trennepohl avatar image
Thiago Trennepohl answered

Sounds awesome, but the users I meant are Studio users, not players. Will this approach still work?

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.

Seth Du avatar image Seth Du ♦ commented ·

It won't work. PlayFab APIs are designed for title and players. You may need to manually assign Roles for different studio users. However, you are able to create customized Roles and save it as Json file, so that you can upload this configuration file in other studios.

0 Likes 0 ·
Seth Du avatar image
Seth Du answered

PlayFab provides APIs to get or edit Global Entity Policy and Profile Policy of a specific player –

  1. GetGlobalPolicy
  2. SetGlobalPolicy
  3. SetProfilePolicy
  4. GetProfile (to get a specific entity’s Policy, including Groups)

You may create a CloudScript Azure Function to assign the permission automatically when the player is created in the title via Rule. However, please note that for a newly created player, it will take some time to initialize profiles (usually take a few minutes). Immediate triggered functions to edit profile policy may fail.

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.