自定义策略验证错误

Custom policy validation error

使用 AADB2C Identity Experience Framework 自定义策略,我正在尝试创建一个允许多个社交提供商以及本地提供商的 UserJourney,但只允许登录,不允许注册。当我上传包含 UserJourney 的 TrustFrameworkExtensions 文件时,上传失败并显示错误:

Unable to upload policy. Reason : Validation failed: 2 validation error(s) found in policy "B2C_1A_TRUSTFRAMEWORKEXTENSIONS" of tenant "mytenant.onmicrosoft.com".ClaimsExchange with id "SignInWithLogonNameExchange" is referenced in UserJourney with id "SignInAny" in policy "B2C_1A_TrustFrameworkExtensions" of tenant "mytenant.onmicrosoft.com", but it was not found.ClaimsExchange with id "SignInWithLogonNameExchange" is referenced in UserJourney with id "SignInAny" in policy "B2C_1A_TrustFrameworkExtensions" of tenant "MBHB2C.onmicrosoft.com", but it was not found.

我认为包含所有相关内容的 UserJourney 的第一部分是:

<UserJourney Id="SignInAny"> 
    <OrchestrationSteps> 
        <OrchestrationStep Order="1" Type="ClaimsProviderSelection" ContentDefinitionReferenceId="api.idpselections"> 
            <ClaimsProviderSelections> 

                <ClaimsProviderSelection TargetClaimsExchangeId="SignInWithLogonNameExchange" /> 
                <ClaimsProviderSelection TargetClaimsExchangeId="KDEWebAppTestExchange" /> 
                <ClaimsProviderSelection TargetClaimsExchangeId="MSAExchange" /> 
                <ClaimsProviderSelection TargetClaimsExchangeId="GoogleExchange" /> 
            </ClaimsProviderSelections> 

            <ClaimsExchanges> 
                <ClaimsExchange Id="SignInWithLogonNameExchange" TechnicalProfileReferenceId="SelfAsserted-LocalAccountSignin-Email" /> 
            </ClaimsExchanges> 
        </OrchestrationStep> 

        <!-- Check if the user has selected to sign in using one of the social providers --> 
        <OrchestrationStep Order="2" Type="ClaimsExchange"> 
            <Preconditions> 
                <Precondition Type="ClaimsExist" ExecuteActionsIf="true"> 
                    <Value>objectId</Value> 
                    <Action>SkipThisOrchestrationStep</Action> 
                </Precondition> 
            </Preconditions> 
            <ClaimsExchanges> 
                <ClaimsExchange Id="KDEWebAppTestExchange" TechnicalProfileReferenceId="KDEWebAppTestProfile" /> 
                <ClaimsExchange Id="MSAExchange" TechnicalProfileReferenceId="MSA-OIDC" /> 
                <ClaimsExchange Id="GoogleExchange" TechnicalProfileReferenceId="Google-OAUTH" /> 
            </ClaimsExchanges> 
        </OrchestrationStep> 
        ...
    </UserJourney> 
</OrchestrationSteps> 

我不明白 未找到 的实际含义。

建议?

谢谢!

马丁

基本上,在 OrchestrationStepOrder 1 中,您有以下行:

<ClaimsProviderSelection TargetClaimsExchangeId="SignInWithLogonNameExchange" /> 

TargetClaimsExchangeId 是对下一个 OrchestrationStep 中的 ClaimsExchange 元素的引用。但是,在 Id 设置为 SignInWithLogonNameExchange.

的下一步中,您没有类似于此的行
<ClaimsExchange Id="GoogleExchange" TechnicalProfileReferenceId="Google-OAUTH" /> 

因此当用户单击与 ClaimsProviderSelection 对应的按钮时,IEF 不知道该做什么(例如使用哪个技术配置文件)。