question

Martin avatar image
Martin asked

NotAuthorized when adding shared group data even though I am admin

I have started to get 'NotAuthorized' errors when testing adding shared group data. I have checked that I am in the admins group. I am using the UE4 sdk, and just calling 2 functions.

  • First I call CreateGroup the only parameter is the group name, which is a random GUID. I can see that this return successfully and the group is shown in my dashboard. I have not modified any default group setup.
  • Then I call UpdateSharedGroupData using the FUpdateSharedGroupDataRequest data structue. I can see the SharedGroupId is correct, and I add any single data item to the Data map. I have tried with setting the Permission to public or private or not setting it at all

The result from the second call is a 'NotAuthorised' error. This should be very easy to reproduce as its just calling those 2 functions. Everything else is default behaviour that I have not modified. Is there anything I'm doing wrong here? Is there some other setup I have to do to modify the group data?

Thanks




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.

Martin avatar image Martin commented ·

Just as a follow up, I've tried changing the group policy document to default allow everything:

[
  {
    "Action": "*",
    "Effect": "Allow",
    "Resource": "pfrn:group--*!*",
    "Principal": "*",
    "Comment": "Allow all entities to read the group's metadata, such as name",
    "Condition": null
  }
]


I know that this wouldn't be set up like this in a real environment, but it should be a useful test to see if its the group policy causing an issue, but still get the NotAuthorized error. All other requests, such as fetching member lists and fetching group data seem to work as intended with no error, so I'm not sure what else might be the problem here.

0 Likes 0 ·

1 Answer

·
Citrus Yan avatar image
Citrus Yan answered

You’re using the wrong API. Assuming that you want to create a Shared Group and adding some data in it, the first API should be CreateSharedGroup, not CreateGroup.

The CreateGroup API belongs to the Entity groups feature, which is different from Shared Group Data, for more details, please see: Entity Groups - PlayFab | Microsoft Docs. Therefore, if you want to update the data about a Entity Group, then the 2nd API should be SetObjects (Entity Groups are also entities themselves), and use GetProfile(s) to retrieve such info.

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.