我如何找出导致Azure B2C 500内部服务器错误的原因?

时间:2019-02-09 06:42:16

标签: azure-ad-b2c identity-experience-framework

我试图向我的Azure B2C IEF用户旅程添加编排步骤,但是,当我进行更改时,我常常会收到错误消息:“ 500-内部服务器错误”

我尝试使用Application Insights,但这并没有告诉您与错误500相关的任何信息。

这是我的技术资料

    <TechnicalProfile Id="Step1">
      <DisplayName>Step 1</DisplayName>
      <Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.SelfAssertedAttributeProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
      <OutputClaims>
        <OutputClaim ClaimTypeReferenceId="email" PartnerClaimType="Email" Required="true"/>
        <OutputClaim ClaimTypeReferenceId="newPassword" Required="true" />
        <OutputClaim ClaimTypeReferenceId="reenterPassword" Required="true" />
      </OutputClaims>
    </TechnicalProfile>

这是我的用户旅程步骤

    <OrchestrationStep Order="3" Type="ClaimsExchange">
      <Preconditions>
        <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
          <Value>objectId</Value>
          <Action>SkipThisOrchestrationStep</Action>
        </Precondition>
      </Preconditions>
      <ClaimsExchanges>
        <ClaimsExchange Id="SignUpWithLogonEmailExchange" TechnicalProfileReferenceId="Step1" />
      </ClaimsExchanges>
    </OrchestrationStep>

是否有办法找出导致这500个内部服务器错误的原因?

1 个答案:

答案 0 :(得分:2)

ContentDefinition SelfAssertedAttributeProvider技术资料必须在ContentDefinition部分中指定一个Metadata。这是您的技术资料中缺少的内容。

OutputClams

技术资料ValidationTechnicalProfile中没有Step1。可能可能是一个问题。由于这些是OutputClaims,因此该策略必须指定一种为每个值创建值的方法(即使在运行时可能实际上并未创建)。因此,OutputClaim必须具有以下三个之一:

  1. 指定一个DefaultValue,以保证在调用TechnicalProfile之后它将具有该值。
  2. UserInputType下的ClaimType中指定一个ClaimsSchema,这表明存在一种从用户检索该值的方法。
  3. 将其指定为OutputClaim中的ValidationTechnicalProfile,这将允许另一个提供程序检索该值(例如,从AD Graph或Rest API)。

加密密钥SelfAssertedAttributeProvider TechnicalProfile还需要一个CryptographicKeys部分,用于指定提供商使用的密钥。

我建议从Starter Packs Github复制技术资料并进行修改,因为它们将包含所有必需的元素。

(服务返回500的事实是一个错误,需要修复。)

相关问题