User Flow - API connector cannot parse response

I have an Azure B2C user flow. It is associated with an API Connector pointing to an Azure Function. The function returns a ResponseContent with extension claims:

public class ResponseContent
{
    public const string ApiVersion = "1.0.0";

    public ResponseContent()
    {
        this.version = ResponseContent.ApiVersion;
        this.action = "Continue";
    }

    public ResponseContent(string action, string userMessage)
    {
        this.version = ResponseContent.ApiVersion;
        this.action = action;
        this.userMessage = userMessage;
    }

    public ResponseContent(string userTypes, string accountIdentifiers, string pricebookAuthorized, string portalAuthorized)
    {
        this.version = ResponseContent.ApiVersion;
        this.action = "Continue";
        this.extension_UserTypes = userTypes;
        this.extension_AccountIdentifiers = accountIdentifiers;
        this.extension_PricebookAuthorized = pricebookAuthorized;
        this.extension_PortalAuthorized = portalAuthorized;
    }

    public string version { get; }
    public string action { get; set; }

    [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
    public string userMessage { get; set; }

    [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
    public string extension_UserTypes { get; set; }

    [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
    public string extension_AccountIdentifiers { get; set; }

    [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
    public string extension_PricebookAuthorized { get; set; }

    [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
    public string extension_PortalAuthorized { get; set; }
}

Here are the claims of the user flow:

enter image description here

When I run this Azure function using Postman, the following is returned:

{
  "version": "1.0.0",
  "action": "Continue",
  "extension_UserTypes": "",
  "extension_AccountIdentifiers": "",
  "extension_PricebookAuthorized": "",
  "extension_PortalAuthorized": ""
}

But when I try to run the user flow on Azure, I get

Microsoft.Identity.Client.MsalServiceException: AADB2C90261: The claims exchange 'PreSendClaimsRestful' specified in step '2' returned HTTP error response that could not be parsed.

What might be wrong, and how this can be diagnosed?



Comments

Popular posts from this blog

Spring Elasticsearch Operations

Network Error and Timeout on Authorize.net JS

Object oriented programming concepts (OOPs)