500 Internal Server Error in Azure AD B2C

2019-08-18 09:10发布

问题:

When I try to execute my sign-up policy I'm receiving:

Why?

回答1:

I was trying to display the field but I hadn't defined the <UserInputType> node.

<ClaimType Id="extension_HelloWorld">
    <DisplayName>Hello World</DisplayName>
    <DataType>string</DataType>
    <DefaultPartnerClaimTypes>
        <Protocol Name="OAuth2" PartnerClaimType="HelloWorld" />
        <Protocol Name="OpenIdConnect" PartnerClaimType="HelloWorld" />
    </DefaultPartnerClaimTypes>
    <!-- I had the following line commented out -->
    <!--<UserInputType>Readonly</UserInputType>-->
</ClaimType>