是否可以从继承的政策中忽略或隐藏输出声明?

时间:2020-04-17 14:38:08

标签: azure-ad-b2c

当前,我有两个RP策略,它们继承自TrustFrameworkExtensions策略并使用相同的UserJourney。

我遇到的问题是,在一项政策中,我需要某些输出声明不包括在内,而在另一项中要包括在内。

Azure Ad B2C文档仅指定我们具有覆盖继承项的功能,但没有指定在可能的情况下如何省略。

<TechnicalProfile Id="GatherBasicInformation">
          <OutputClaims>
            <OutputClaim ClaimTypeReferenceId="email" Required="true"/>
            <OutputClaim ClaimTypeReferenceId="newPassword" Required="true"/>
            <OutputClaim ClaimTypeReferenceId="reenterPassword" Required="true"/>
            <OutputClaim ClaimTypeReferenceId="givenName" Required="true"/>
            <OutputClaim ClaimTypeReferenceId="surName" Required="true"/>
            <OutputClaim ClaimTypeReferenceId="country" Required="true" />
            <OutputClaim ClaimTypeReferenceId="extension_Consent" Required="true"/>
            <OutputClaim ClaimTypeReferenceId="extension_AccountType" Required="true"/>
            <OutputClaim ClaimTypeReferenceId="objectId"/>
            <OutputClaim ClaimTypeReferenceId="DisplayValidateMessage" DefaultValue="true"/>
            <OutputClaim ClaimTypeReferenceId="newUser"/>
          </OutputClaims>
          <ValidationTechnicalProfiles>
            <ValidationTechnicalProfile ReferenceId="WriteBasicInformation"/>
            <ValidationTechnicalProfile ReferenceId="EmailVerification-SendLink"/>
          </ValidationTechnicalProfiles>
          <IncludeTechnicalProfile ReferenceId="StepLayout"/>
        </TechnicalProfile>

需要从一个RP删除的两个输出声明是extension_consent和extension_accountType。

我尝试将其从基本技术资料中删除,并将其作为覆盖直接添加到RP策略中,但是它将声明移到列表的顶部,而不是我需要它们的底部。

是否可以忽略或隐藏某些输出声明?

1 个答案:

答案 0 :(得分:0)

您不能忽略输出或通过覆盖删除任何内容。覆盖始终是合并操作。

使用IncludeTechnicalProfile概念。您需要2个单独的用户旅程,并且每个旅程都需要各自的技术资料参考。然后将相应的用户旅程ID绑定到2个RP文件。

<TechnicalProfile Id="GatherBasicInformationMinimum">
          <OutputClaims>
            <OutputClaim ClaimTypeReferenceId="email" Required="true"/>
            <OutputClaim ClaimTypeReferenceId="newPassword" Required="true"/>
            <OutputClaim ClaimTypeReferenceId="reenterPassword" Required="true"/>
            <OutputClaim ClaimTypeReferenceId="givenName" Required="true"/>
            <OutputClaim ClaimTypeReferenceId="surName" Required="true"/>
            <OutputClaim ClaimTypeReferenceId="country" Required="true" />
            <OutputClaim ClaimTypeReferenceId="objectId"/>
            <OutputClaim ClaimTypeReferenceId="DisplayValidateMessage" DefaultValue="true"/>
            <OutputClaim ClaimTypeReferenceId="newUser"/>
          </OutputClaims>
          <IncludeTechnicalProfile ReferenceId="StepLayout"/>
        </TechnicalProfile>
<TechnicalProfile Id="GatherBasicInformationAnd2Claims">
          <OutputClaims>
            <OutputClaim ClaimTypeReferenceId="extension_Consent" Required="true"/>
            <OutputClaim ClaimTypeReferenceId="extension_AccountType" Required="true"/>
          </OutputClaims>
          <ValidationTechnicalProfiles>
            <ValidationTechnicalProfile ReferenceId="WriteBasicInformation"/>
            <ValidationTechnicalProfile ReferenceId="EmailVerification-SendLink"/>
          </ValidationTechnicalProfiles>
          <IncludeTechnicalProfile ReferenceId="GatherBasicInformationMinimum"/>
        </TechnicalProfile>