I have a basic Cloudscript Function that works when called in PlayFab, but the FunctionResult is always null ( and total API calls issued to be 0). Again, the script works when being called in PlayFab or from PlayStream, just not with client code.
"TestFunc" Azure Function:
[FunctionName("TestFunc")] public static async Task<dynamic> TestFunc( [HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] HttpRequestMessage req, ILogger log) { return new {DayOfWeek = true}; }
Result from PlayFab:
256dec1eeaaa6fe5a2b52eae14e8cae7.png
The client code works if the script invoked is a Cloudscript Revision. Yes, I double-checked that I invoked the correct function name.
Client Code:
PlayFabClientAPI.ExecuteCloudScript(new ExecuteCloudScriptRequest { FunctionName = PollUpdateScriptName, GeneratePlayStreamEvent = false }, OnUpdateCloudResult, OnError);
The callback 'OnUpdateCloudResult' is invoked, with its ExecuteCloudScriptResult parameter containing a null FunctionResult and 0 APIRequestsIssued.
Why does the function execute everywhere except when my C# invokes it directly?