question

Jordan Maxwell avatar image
Jordan Maxwell asked

Unable to modify policy to allow game server to access inventory

Hello,

We require the game_server entity to be able to access specific inventory apis. However, it does not seem possible to give the entity through the global title policy.

We've tried the following so far

   {
     "Action": "*",
     "Effect": "Allow",
     "Resource": "pfrn:data--*!*/Inventory/GetInventoryCollectionIds",
     "Principal": {
       "ChildOf": {
         "EntityType": "namespace",
         "EntityId": "183B2CDDC507DA31"
       }
     },
     "Comment": "Allow game server to read inventory collections",
     "Condition": {
       "CallingEntityType": "game_server"
     }
   },
   {
     "Action": "*",
     "Effect": "Allow",
     "Resource": "pfrn:data--*!*/Inventory/GetInventoryItems",
     "Principal": {
       "ChildOf": {
         "EntityType": "namespace",
         "EntityId": "183B2CDDC507DA31"
       }
     },
     "Comment": "Allow game server to read inventory items",
     "Condition": {
       "CallingEntityType": "game_server"
     }
   }

Is this a known issue?

In-Game EconomyentitiesCustom Game Servers
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

·
Neils Shi avatar image
Neils Shi answered

If you want to modify the Economy v2 Inventory policy, you can navigate to [Title settings]->[Economy v2]->[Policy(v2)]. And please note that the default v2 policy has already enable game_server(title) entity to access the Inventory APIs, you don’t need to modify it. If your title cannot access the Inventory APIs, could you tell us more info about your scenario? Are there any error messages?

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.

Jordan Maxwell avatar image Jordan Maxwell commented ·

Those settings don't seem to support the game_server entity. Only title and player. We are using the game server entity mentioned here https://learn.microsoft.com/en-us/rest/api/playfab/authentication/authentication/authenticate-game-server-with-custom-id?view=playfab-rest

The error messages say that the api can only be accessed by title, master_player_account, and title_player_account

0 Likes 0 ·
Neils Shi avatar image Neils Shi Jordan Maxwell commented ·

The Entity of game_server is still under development, please pay attention to the follow-up update of Available Built-In Entity Types - PlayFab | Microsoft Learn. As mentioned in the error message, currently, this Api can only be accessed by title, master_player_account, and title_player_account entity.

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.