首页 > 解决方案 > 使用 OnItemExistenceInStringCollectionClaim 禁用 LocalAccount

问题描述

是否可以使用以下方法启用 LocalAccount 声明提供程序:

<EnabledForUserJourneys>OnItemExistenceInStringCollectionClaim</EnabledForUserJourneys>

我有一个像这样的子旅程:

    <SubJourney Id="IdentityProviderSelection_SignIn" Type="Call">
      <OrchestrationSteps>
        <OrchestrationStep Order="1" Type="CombinedSignInAndSignUp" ContentDefinitionReferenceId="api.signin">
          <ClaimsProviderSelections>
            <ClaimsProviderSelection TargetClaimsExchangeId="SomeAccountExchange" />
            <ClaimsProviderSelection TargetClaimsExchangeId="ExternalIDPSAML2" />
            <ClaimsProviderSelection ValidationClaimsExchangeId="LocalAccountSigninUsernameEmailExchange" />
          </ClaimsProviderSelections>
        </OrchestrationStep>
        <OrchestrationStep Order="2" Type="ClaimsExchange">
          <ClaimsExchanges>
            <ClaimsExchange Id="SomeAccountExchange" TechnicalProfileReferenceId="Some-OIDC" />
            <ClaimsExchange Id="ExternalIDPSAML2" TechnicalProfileReferenceId="ExternalIDP-SAML2" />
          </ClaimsExchanges>
        </OrchestrationStep>
      </OrchestrationSteps>
    </SubJourney>

我可以使用“OnItemExistenceInStringCollectionClaim”启用/禁用前两个 ClaimsProviderSelection,但我无法让它为 LocalAccountSigninUsernameEmailExchange 工作。

这是因为它引用了 ValidationClaimsExchangeId 吗?

我试过添加:

   <TechnicalProfile Id="LocalAccountUsernameEmail-Common">
     <Metadata>
       <Item Key="ClaimTypeOnWhichToEnable">identityProviders</Item>
       <Item Key="ClaimValueOnWhichToEnable">local</Item>
     </Metadata>          
   </TechnicalProfile>

有什么建议么?我只需要以任意组合启用禁用这三个索赔提供者,而我被困在本地帐户上....

标签: azure-ad-b2c-custom-policy

解决方案


推荐阅读