I need to fetch profiles of a player's friends with GetProfiles in my Azure Function. But the profiles list comes back empty. Please see the source code sequence below. What am I doing wrong here?
// Azure Function code PlayFabSettings.staticSettings.TitleId = "<my title id>";<br>PlayFabSettings.staticSettings.DeveloperSecretKey = "<my dev secret key>"; // Call GetEntityToken var requestEntityToken = new PlayFab.AuthenticationModels.GetEntityTokenRequest(); var resultEntityToken = await PlayFab.PlayFabAuthenticationAPI.GetEntityTokenAsync(requestEntityToken); // successfully returns the entity token in result // Call GetFriendsList var getFriendsT = await Player.GetFriendsList(playerId); var friends = getFriendsT.Result.Friends; // successfully returns list of friends // Prepare Entities for GetProfilesRequest List<PlayFab.ProfilesModels.EntityKey> entities = new List<PlayFab.ProfilesModels.EntityKey>(); foreach (var friend in friends) { entities.Add( new PlayFab.ProfilesModels.EntityKey() { Id = friend.FriendPlayFabId, Type = "title_player_account" } ); } // Call GetProfiles var request = new GetEntityProfilesRequest(); request.AuthenticationContext = new PlayFabAuthenticationContext(); request.AuthenticationContext.EntityToken = resultEntityToken.Result.EntityToken; request.Entities = entities; var resultProfiles = await PlayFabProfilesAPI.GetProfilesAsync(request); // PROBLEM: resultProfiles.Result.Profiles list is empty!