Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sql-server-2005/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Azure ad b2c Azure AD B2C注册,无用户输入_Azure Ad B2c_Identity Experience Framework - Fatal编程技术网

Azure ad b2c Azure AD B2C注册,无用户输入

Azure ad b2c Azure AD B2C注册,无用户输入,azure-ad-b2c,identity-experience-framework,Azure Ad B2c,Identity Experience Framework,我已经将Azure AD B2C设置为允许用户使用此处描述的自定义策略从“常规”AAD目录进行身份验证。在一个场景中,我希望用户进行注册(使用其AAD凭据进行身份验证,在AAD B2C目录中创建相应的对象,并将objectidentifier作为声明传递给我的应用程序),而不提供任何进一步的信息。从这些例子开始,我不知道如何完全跳过自我主张步骤。我尝试过的两种方法是 1) 消除自我主张的社会权利变更,以及 2) 修改(实际上,复制到TrustFrameworkExtensions、重命名和编辑)

我已经将Azure AD B2C设置为允许用户使用此处描述的自定义策略从“常规”AAD目录进行身份验证。在一个场景中,我希望用户进行注册(使用其AAD凭据进行身份验证,在AAD B2C目录中创建相应的对象,并将objectidentifier作为声明传递给我的应用程序),而不提供任何进一步的信息。从这些例子开始,我不知道如何完全跳过自我主张步骤。我尝试过的两种方法是

1) 消除自我主张的社会权利变更,以及 2) 修改(实际上,复制到TrustFrameworkExtensions、重命名和编辑)自断言的Social和AAD UserReadUsingObjectId ClaimsChanges,以便仅输出声明项不需要用户提示

在这两种方法中,从UI的角度来看,注册似乎都可以工作,但在B2C目录中没有创建任何用户对象。使用App Insights,在这两种方法中,AAD UserReadUsingObjectId似乎都会生成Microsoft.Cpim.Common.PolicyException

完整的用户旅程是

<UserJourney Id="SignUpAAD">
      <OrchestrationSteps>
        <OrchestrationStep Order="1" Type="CombinedSignInAndSignUp" ContentDefinitionReferenceId="api.signuporsignin">
          <ClaimsProviderSelections>
            <ClaimsProviderSelection TargetClaimsExchangeId="KDEWEbAppTestExchange"   />
          </ClaimsProviderSelections>
        </OrchestrationStep>

        <OrchestrationStep Order="2" Type="ClaimsExchange">
          <ClaimsExchanges>
            <ClaimsExchange Id="KDEWebAppTestExchange" TechnicalProfileReferenceId="KDEWebAppTestProfile" />
          </ClaimsExchanges>
        </OrchestrationStep>

        <OrchestrationStep Order="3" Type="ClaimsExchange">
           <ClaimsExchanges>
            <ClaimsExchange Id="AADUserReadUsingAlternativeSecurityId" TechnicalProfileReferenceId="AAD-UserReadUsingAlternativeSecurityId-NoError" />
          </ClaimsExchanges>
        </OrchestrationStep>

         <!-- prepare ground for searching for user -->
        <OrchestrationStep Order="4" Type="ClaimsExchange">
          <ClaimsExchanges>
            <ClaimsExchange Id="SelfAsserted-Social-Silent" TechnicalProfileReferenceId="SelfAsserted-Social-Silent" />
          </ClaimsExchanges>
        </OrchestrationStep>

        <!-- This step reads any user attributes that we may not have received when authenticating using ESTS so they can be sent 
          in the token. -->
        <OrchestrationStep Order="5" Type="ClaimsExchange">
          <ClaimsExchanges>
            <ClaimsExchange Id="AADUserReadWithObjectId" TechnicalProfileReferenceId="AAD-UserReadUsingObjectIdLimited" />
          </ClaimsExchanges>
        </OrchestrationStep>

        <!-- create the user in the directory if one does not already exist 
             (verified using objectId which would be set from the last step if account was created in the directory. -->
        <OrchestrationStep Order="6" Type="ClaimsExchange">
          <ClaimsExchanges>
            <ClaimsExchange Id="AADUserWrite" TechnicalProfileReferenceId="AAD-UserWriteUsingAlternativeSecurityId" />
          </ClaimsExchanges>
        </OrchestrationStep>

        <OrchestrationStep Order="7" Type="SendClaims" CpimIssuerTechnicalProfileReferenceId="JwtIssuer" />

      </OrchestrationSteps> 
    </UserJourney>

有什么想法吗

谢谢


Martin

您必须将编排步骤4替换为以下编排步骤:


目标
SkipThisOrchestrationStep

如果在业务流程步骤3中未检索到用户对象(即“objectId”声明不存在),则此业务流程步骤将创建一个用户对象。

如果我这样做,是否还保留步骤5(AADUserReadWithObjectId)和步骤6(重复的AAD UserWriteUsingAlternativeSecurityId)?确定,我将编排步骤4替换为您推荐的简化版本(省去了前提条件,因为我愿意在这个UserTravely中假设对象还不存在),删除了步骤5和6,并将步骤7重新标记为步骤5,它按预期工作。我以为我以前试过,但显然没有。谢谢事实上,在我的场景中,我甚至可以省略编排步骤3(AADUserReadUsingAlternativeSecurityId),因为我愿意假设用户对象不存在。如果您可以接受,那么您可以删除步骤3和步骤4的先决条件。