I'm a bit stuck here in the Groups Azure Function PlayFab API.
I have a valid user calling the Azure Function, and I have their context data including their TitlePlayerAccountID.
I'm trying to check if the user is a member of group "admin" and thus allow updating of game metadata in the underlying database.
This code does not work:
var gr = new GetGroupRequest();
gr.GroupName = "admin";
var group = await PlayFab.PlayFabGroupsAPI.GetGroupAsync(gr);
var output = $"group is {group}\n";
output += $"group id is {group.Result.Group}\n";
This is borked too:
var group = PlayFab.PlayFabGroupsAPI.GetGroupAsync(new GetGroupRequest() {GroupName = "admin"});
output += $"group is {group}\n";
I tried executing this query directly to the underlying Http API call with postman, but I couldn't figure out where to stick the EntityToken in the headers, so I just got the "This API method does not allow anonymous callers." result.
I considered capturing the TitlePlayerAccountId and tracking groups in my non-playfab database, but that seems ugly.
Help a fella out? Am I on the right track here or missing something?
Cheers.