简体   繁体   English

仅具有“注册”页面的Azure AD B2C自定义策略

[英]Azure AD B2C Custom Policy with Sign Up Page Only

I want to create a custom policy in Azure AD B2C. 我想在Azure AD B2C中创建自定义策略。 I can't find such an example in the starterpack ( https://github.com/Azure-Samples/active-directory-b2c-custom-policy-starterpack ). 我在starterpack( https://github.com/Azure-Samples/active-directory-b2c-custom-policy-starterpack )中找不到这样的示例。

I checked this post Azure AD B2C Link to Sign Up Page (Not Sign In) and if I understand it correctly there is no url I can use of existing custom signup_signin policy to end up directly in Sign Up page. 我检查了此帖子“ Azure AD B2C链接到注册页面”(未登录 ,如果我正确理解它的网址,则可以使用现有的自定义signup_signin策略直接在“注册页面”中结束。 Creating "Sign up v2" flow works, but I need a custom one and coping code from the build in one and placing it to the LocalAccounts example from the starterpack doesn't work. 创建“注册v2”流程是可行的,但是我需要一个自定义流程并从其中一个构建中处理代码,然后将其从starterpack中放入LocalAccounts示例中是行不通的。

This is the UserJourney code downloaded from "Sign up v2" flow 这是从“注册v2”流程下载的UserJourney代码

    <UserJourney Id="B2CSignUp_V2"> <OrchestrationSteps> <OrchestrationStep 
    Order="1" Type="ClaimsProviderSelection" 
    ContentDefinitionReferenceId="api.idpselections.signup"> 
    <ClaimsProviderSelections> <ClaimsProviderSelection 
    TargetClaimsExchangeId="SignUpWithLogonEmailExchange" /> 
    </ClaimsProviderSelections> </OrchestrationStep> </OrchestrationSteps> 
    </UserJourney>

I tried to replace the OrchestrationStep 1 and 2 from the starterpack with the one here but it doesn't work. 我尝试将starterpack中的OrchestrationStep 1和2替换为此处的一个,但是它不起作用。

Alternatively, you can: 或者,您可以:

  • Remove orchestration step 1 删除业务流程步骤1
  • Remove the objectId precondition from orchestration step 2 从业务流程步骤2中删除objectId前提条件
  • Renumber the following orchestration steps 重新编号以下编排步骤

Such as: 如:

<OrchestrationStep Order="1" Type="ClaimsExchange">
  <ClaimsExchanges>
    <ClaimsExchange Id="SignUpWithLogonEmailExchange" TechnicalProfileReferenceId="LocalAccountSignUpWithLogonEmail" />
  </ClaimsExchanges>
</OrchestrationStep>
<OrchestrationStep Order="2" Type="ClaimsExchange">
  <ClaimsExchanges>
    <ClaimsExchange Id="AADUserReadWithObjectId" TechnicalProfileReferenceId="AAD-UserReadUsingObjectId" />
  </ClaimsExchanges>
</OrchestrationStep>
<OrchestrationStep Order="3" Type="SendClaims" CpimIssuerTechnicalProfileReferenceId="JwtIssuer" />

In your Custom policies, In the B2C_1A_TrustFrameworkBase.xml file replace the 1st Orchestration Step for the User Journey Id="SignUpOrSignIn" with the following Orchestration Step and you will be directly landed to Signup page - 在您的自定义策略中,在B2C_1A_TrustFrameworkBase.xml文件中,将用户旅程Id =“ SignUpOrSignIn”的第一个编排步骤替换为以下编排步骤,您将直接进入“注册”页面-

<OrchestrationStep Order="1" Type="ClaimsProviderSelection" ContentDefinitionReferenceId="api.idpselections.signup">
<ClaimsProviderSelections>
<ClaimsProviderSelection TargetClaimsExchangeId="SignUpWithLogonEmailExchange" />
</ClaimsProviderSelections>
</OrchestrationStep>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM