azure-ad-b2c / samples

Azure AD B2C custom policy solutions and samples.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom policy `change-sign-in-name`: The page cannot be displayed because an internal server error has occurred.

kmoravcik opened this issue · comments

Im trying to use the example from https://github.com/azure-ad-b2c/samples/tree/master/policies/change-sign-in-name

After I upload this xml file and I try to run it I get a blank page with en error message:
The page cannot be displayed because an internal server error has occurred.

In app insights I found this error message:

Exception Message:A content definition data uri is required. Orchestration step '2' of user journey 'ChangeEmail' in policy 'B2C_1A_Email' does not reference one nor does one of its referenced technical profiles., Exception Type:PolicyException, CorrelationID:c5ce1469-b975-4aea-aac6-4bd32ab6b08b

Im using Orchestration step 2 from the sample:

        <!--Demo: Sign-in user with local account-->
        <OrchestrationStep Order="2" Type="ClaimsExchange">
          <ClaimsExchanges>
            <ClaimsExchange Id="LocalAccountSigninEmailExchange" TechnicalProfileReferenceId="SelfAsserted-LocalAccountSignin-Email" />
          </ClaimsExchanges>
        </OrchestrationStep>

I tried to apply the ContentDefinitionReferenceId element. But its still not working for me. Now I get the same blank page with the error message but this time in app nsights I no longer see a detailed exception just a generic message: Exception Message:An internal error has occurred., CorrelationID:c5ce1469-b975-4aea-aac6-4bd32ab6b08b. So Im not even able to debug this.

I tried these two ContentDefinitionReferenceIds:

ContentDefinitionReferenceId="api.localaccountsignup"
ContentDefinitionReferenceId="api.selfasserted"

Maybe these are wrong and I need to use a different one ? Does anyone know how to fix this problem ? Thanks

This technical profile is coming from the starter pack: https://github.com/Azure-Samples/active-directory-b2c-custom-policy-starterpack/blob/main/LocalAccounts/TrustFrameworkBase.xml#L697

If you’ve deployed the starter pack, then it will just use that. You can deploy the starter pack at https://aka.ms/iefsetup.