首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >问答首页 >Microsoft文档中B2C重置密码流不起作用

Microsoft文档中B2C重置密码流不起作用
EN

Stack Overflow用户
提问于 2021-06-21 21:49:54
回答 1查看 14关注 0票数 0

https://docs.microsoft.com/en-us/azure/active-directory-b2c/add-password-reset-policy?pivots=b2c-custom-policy

我遵循microsoft为自定义策略模板和初学者包提供的配置示例(请注意,初学者包在1.0.0版上仍然具有API页面布局的所有模板)。我已经将流程更新为模板2.1.4(最新版本),以及1.2.1或微软在此页面上推荐的其他版本:https://docs.microsoft.com/en-us/azure/active-directory-b2c/contentdefinitions#migrating-to-page-layout

但是,每次上传完我的3个自定义策略(base、extension、signupsignin)后点击忘记密码链接时,我在appInsights实例中都会收到以下错误:

在租户"yourTenant.onmicrosoft.com“的id为"AAD-UserReadUsingAlternativeSecurityId-NoError”策略"B2C_1A_signup_signin“的技术配置文件中定义的id为"alternativeSecurityId”的查找索赔中找不到索赔。

注意:我在这里输入了“Note tenant”,但它显然不是我的租户姓名。登录流程以及我对策略所做的任何其他自定义都工作正常。我甚至回过头来将策略设置为不进行任何自定义,只是尝试设置密码重置流程,但仍然没有可用的示例。

不幸的是,没有太多的信息在那里帮助我解决这个错误,所以我想问社区一些指针或如果有人有一个重置策略的这一部分的工作示例,如果不只是考虑为重置密码创建一个标准的userJourney,因为推荐的版本显然不起作用。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-06-22 16:48:25

好了,经过两天的反复试验,我终于让它工作了。因此,说明中缺少一个步骤。在用于忘记密码的索赔交换之后,但在调用子旅程之前,您实际上必须调用索赔交换。话虽如此,我还是这样做的:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
<!--This step will trigger the actual forgot password exchange and show us the page from the integrated policy.-->
    <OrchestrationStep Order="4" Type="ClaimsExchange">
      <Preconditions>
        <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
          <Value>objectId</Value>
          <Action>SkipThisOrchestrationStep</Action>
        </Precondition>
      </Preconditions>
      <ClaimsExchanges>
        <ClaimsExchange Id="ForgotPasswordXchange" TechnicalProfileReferenceId="ForgotPassword" /> 
      </ClaimsExchanges><!--Id must be unique-->
    </OrchestrationStep>

如果有人想要更正一些东西,或者发送更新或建议,这就是我的用户之旅最终是什么样子,以及我的子旅程:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
<UserJourneys>
    <UserJourney Id="CustomSignUpOrSignIn">
      <OrchestrationSteps>
        <!-- HRD initialization -->
        <!-- Changes based off of  <UserJourney Id="HRD_Internal">  -->
        <OrchestrationStep Order="1" Type="ClaimsExchange">
          <ClaimsExchanges>
            <ClaimsExchange Id="HRD" TechnicalProfileReferenceId="HRD_Function" />
          </ClaimsExchanges>
        </OrchestrationStep>
        <OrchestrationStep Order="2" Type="CombinedSignInAndSignUp" ContentDefinitionReferenceId="api.signuporsignin">
          <Preconditions>
            <!--
           <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
             <Value>idp</Value>
             <Action>SkipThisOrchestrationStep</Action>
           </Precondition>
           -->
            <Precondition Type="ClaimEquals" ExecuteActionsIf="false">
              <Value>idpHint</Value>
              <Value></Value>
              <Action>SkipThisOrchestrationStep</Action>
            </Precondition>
          </Preconditions>
          <ClaimsProviderSelections>
            <ClaimsProviderSelection TargetClaimsExchangeId="TestExchange1" />
            <ClaimsProviderSelection ValidationClaimsExchangeId="LocalAccountSigninEmailExchange" />
            <ClaimsProviderSelection TargetClaimsExchangeId="ForgotPasswordExchange" />
          </ClaimsProviderSelections>
          <ClaimsExchanges>
            <ClaimsExchange Id="LocalAccountSigninEmailExchange" TechnicalProfileReferenceId="SelfAsserted-LocalAccountSignin-Email" />
          </ClaimsExchanges>
        </OrchestrationStep>
        <!-- Check if the user has selected to sign in using one of the social providers -->
        <OrchestrationStep Order="3" Type="ClaimsExchange">
          <Preconditions>
            <!--
            <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
              <Value>idp</Value>
              <Action>SkipThisOrchestrationStep</Action>
            </Precondition>
            -->
            <Precondition Type="ClaimEquals" ExecuteActionsIf="false">
              <Value>idpHint</Value>
              <Value></Value>
              <Action>SkipThisOrchestrationStep</Action>
            </Precondition>
            <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
              <Value>objectId</Value>
              <Action>SkipThisOrchestrationStep</Action>
            </Precondition>
          </Preconditions>
          <ClaimsExchanges>
            <ClaimsExchange Id="TestExchange1" TechnicalProfileReferenceId="ConcentrixAD-OpenIdConnect" />
            <ClaimsExchange Id="SignUpWithLogonEmailExchange" TechnicalProfileReferenceId="LocalAccountSignUpWithLogonEmail" />
            <ClaimsExchange Id="ForgotPasswordExchange" TechnicalProfileReferenceId="ForgotPassword" />
          </ClaimsExchanges>
        </OrchestrationStep>
        <!--This step will trigger the actual forgot password exchange and show us the page from the integrated policy.-->
        <OrchestrationStep Order="4" Type="ClaimsExchange">
          <Preconditions>
            <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
              <Value>objectId</Value>
              <Action>SkipThisOrchestrationStep</Action>
            </Precondition>
          </Preconditions>
          <ClaimsExchanges>
            <ClaimsExchange Id="ForgotPasswordExchange" TechnicalProfileReferenceId="ForgotPassword" />
          </ClaimsExchanges> <!--Id must be unique-->
        </OrchestrationStep>
        <OrchestrationStep Order="5" Type="InvokeSubJourney">
          <Preconditions>
            <Precondition Type="ClaimsExist" ExecuteActionsIf="false">
              <Value>isForgotPassword</Value>
              <Action>SkipThisOrchestrationStep</Action>
            </Precondition>
          </Preconditions>
          <JourneyList>
            <Candidate SubJourneyReferenceId="PasswordReset" />
          </JourneyList>
        </OrchestrationStep>
        <OrchestrationStep Order="6" Type="ClaimsExchange" ContentDefinitionReferenceId="api.signuporsignin">
          <Preconditions>
            <Precondition Type="ClaimEquals" ExecuteActionsIf="false">
              <Value>idpHint</Value>
              <Value>okta</Value>
              <Action>SkipThisOrchestrationStep</Action>
            </Precondition>
            <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
              <Value>objectId</Value>
              <Action>SkipThisOrchestrationStep</Action>
            </Precondition>
          </Preconditions>
          <ClaimsExchanges>
            <ClaimsExchange Id="HintedOktaSAMLExchange" TechnicalProfileReferenceId="Okta-SAML2" />
          </ClaimsExchanges>
        </OrchestrationStep>
        <!-- For social IDP authentication, attempt to find the user account in the directory. -->
        <OrchestrationStep Order="7" Type="ClaimsExchange">
          <Preconditions>
            <Precondition Type="ClaimEquals" ExecuteActionsIf="true">
              <Value>authenticationSource</Value>
              <Value>localAccountAuthentication</Value>
              <Action>SkipThisOrchestrationStep</Action>
            </Precondition>
          </Preconditions>
          <ClaimsExchanges>
            <ClaimsExchange Id="AADUserReadUsingAlternativeSecurityId" TechnicalProfileReferenceId="AAD-UserReadUsingAlternativeSecurityId-NoError" />
          </ClaimsExchanges>
        </OrchestrationStep>
        <!-- Show self-asserted page only if the directory does not have the user account already (i.e. we do not have an objectId).
              This can only happen when authentication happened using a social IDP. If local account was created or authentication done
              using ESTS in step 2, then an user account must exist in the directory by this time. -->
        <OrchestrationStep Order="8" Type="ClaimsExchange">
          <Preconditions>
            <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
              <Value>objectId</Value>
              <Action>SkipThisOrchestrationStep</Action>
            </Precondition>
          </Preconditions>
          <ClaimsExchanges>
            <ClaimsExchange Id="SelfAsserted-Social" TechnicalProfileReferenceId="SelfAsserted-Social" />
          </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="9" Type="ClaimsExchange">
          <Preconditions>
            <Precondition Type="ClaimEquals" ExecuteActionsIf="true">
              <Value>authenticationSource</Value>
              <Value>socialIdpAuthentication</Value>
              <Action>SkipThisOrchestrationStep</Action>
            </Precondition>
          </Preconditions>
          <ClaimsExchanges>
            <ClaimsExchange Id="AADUserReadWithObjectId" TechnicalProfileReferenceId="AAD-UserReadUsingObjectId" />
          </ClaimsExchanges>
        </OrchestrationStep>
        <!-- The previous step (SelfAsserted-Social) could have been skipped if there were no attributes to collect
                 from the user. So, in that case, 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="10" Type="ClaimsExchange">
          <Preconditions>
            <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
              <Value>objectId</Value>
              <Action>SkipThisOrchestrationStep</Action>
            </Precondition>
          </Preconditions>
          <ClaimsExchanges>
            <ClaimsExchange Id="AADUserWrite" TechnicalProfileReferenceId="AAD-UserWriteUsingAlternativeSecurityId" />
          </ClaimsExchanges>
        </OrchestrationStep>
        <OrchestrationStep Order="11" Type="SendClaims" CpimIssuerTechnicalProfileReferenceId="JwtIssuer" />
      </OrchestrationSteps>
      <ClientDefinition ReferenceId="DefaultWeb" />
    </UserJourney>
 </UserJourneys>
 <SubJourneys>
    <SubJourney Id="PasswordReset" Type="Call">
        <OrchestrationSteps>
            <!--Validate user's email address. Run this step only when user resets the password-->
            <OrchestrationStep Order="1" Type="ClaimsExchange">
              <ClaimsExchanges>
                <ClaimsExchange Id="PasswordResetUsingEmailAddressExchange" TechnicalProfileReferenceId="LocalAccountDiscoveryUsingEmailAddress" />
              </ClaimsExchanges>
            </OrchestrationStep>
            <!--Collect and persist a new password. Run this step only when user resets the password-->
            <OrchestrationStep Order="2" Type="ClaimsExchange">
              <ClaimsExchanges>
                <ClaimsExchange Id="NewCredentials" TechnicalProfileReferenceId="LocalAccountWritePasswordUsingObjectId" />
              </ClaimsExchanges>
            </OrchestrationStep>
        </OrchestrationSteps>
    </SubJourney>
 </SubJourneys>

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68075125

复制
相关文章
Expected object of scalar type Float but got scalar type Double for argument
在pytorch中float32为float类型,而float64则为double类型,注意tensor的数据类型。
狼啸风云
2020/12/01
1.7K0
Expected object of scalar type Float but got scalar type Double for argument
<statement> or DELIMITER expected, got ‘id‘
一、idea mybatis错误信息 <statement> or DELIMITER expected, got ‘id’ PS:idea mybatis报错,很明显是idea配置错误,如图
全栈程序员站长
2022/11/17
3K0
<statement> or DELIMITER expected, got ‘id‘
laravel发送邮件时报Expected response code 250 but got code "530"....错误
**Expected response code 250 but got code "530"with message "530 5.7.1 Authentication required "** 首先看一下.env配置
友儿
2022/09/11
7490
TypeError: an integer is required (got type tuple)
没读到图像。 没读到图像。 没读到图像。 没读到图像。 没读到图像。 没读到图像。 没读到图像。 没读到图像。 没读到图像。 没读到图像。 没读到图像。 没读到图像。 没读到图
狼啸风云
2020/12/22
8120
TypeError: an integer is required (got type tuple)
Python OSError: [Errno 22] Invalid argument 错误解决
在爬取视频数据并保存到本地时报错:OSError: [Errno 22] Invalid argument
花猪
2022/02/16
1.5K0
ORA-00932: inconsistent datatypes: expected - got CLOB
      最近数据库从10.2.0.3升级到了10.2.0.5之后,一些对象无法编译通过。查看了这些对象主要表现在之前写法不严格的SQL语法导致了这些package无法成功编译,诸如select查询列中不能使用混淆的列名称等。另外一个比较表现突出的是返回ORA-00932: inconsistent datatypes: expected - got CLOB错误,即不一致的数据类型,获得CLOB数据类型。下面是这个问题的症状及对策。
Leshami
2018/08/13
2.4K0
vue常见错误:Invalid prop: type check failed for prop “data“. Expected Array, got Object
这个错误的意思是说:无效的命名数据:“数据”类型检查失败。期望数组,得到对象,那么我们这个时候很明白了,是类型不对,但是是哪一行的呢?打开错误信息下面的详情,这个时候找到后缀是自己页面的.vue文件,看看是哪一行,就知道问题在哪了!下面的是我的:
全栈程序员站长
2022/07/01
2.1K0
vue常见错误:Invalid prop: type check failed for prop “data“. Expected Array, got Object
TypeError: parse() got an unexpected keyword argument 'transport_encoding'
有点尴尬,自安装了ANACONDA和TensorFlow之后,首次在ANACONDA Prompt中用pip命令安装第三方库,然而 一大片刺眼的红字就扑面而来, 在ANACONDA Prompt中没
凌川江雪
2018/09/13
1.6K0
TypeError: parse() got an unexpected keyword argument 'transport_encoding'
keras报错:TypeError: softmax() got an unexpected keyword argument 'axis'
网上看到一种说法是由于tensorflow版本过低的问题,这里我的环境中tensorflow的版本是1.2.1,查看版本号的方法:终端命令查看TensorFlow版本号及路径。这种说法的解决方案当然就是升级tensorflow版本了。由于比较麻烦我没有选择这种方法。
Cloudox
2021/11/23
7720
keras报错:TypeError: softmax() got an unexpected keyword argument 'axis'
basic_consume() got multiple values for keyword argument 'queue'
今天在新的服务器上安装了一个pip install pika,然后连接mq的程序就报错了
周小董
2019/06/13
3.4K0
vue常见错误:Invalid prop: type check failed for prop "data". Expected Array, got Object
这个错误的意思是说:无效的命名数据:“数据”类型检查失败。期望数组,得到对象,那么我们这个时候很明白了,是类型不对,但是是哪一行的呢?打开错误信息下面的详情,这个时候找到后缀是自己页面的.vue文件,看看是哪一行,就知道问题在哪了!下面的是我的:
何处锦绣不灰堆
2020/05/29
34.7K0
vue常见错误:Invalid prop: type check failed for prop "data". Expected Array, got Object
[Python开发技巧]·解决Django render() got an unexpected keyword argument 'renderer'问题
当我们使用Django开发个人网站时,如果用到Ueditor,有时会遇到这个问题。
小宋是呢
2019/06/27
2.1K0
[Python开发技巧]·解决Django render() got an unexpected keyword argument 'renderer'问题
model_utils _clone() got an unexpected keyword argument 'subclasses'
发生环境 从 Django 1.11 迁移到 Django 2.2 错误日志 django.request: 2020-05-22 16:12:18,196 E:\py_virtualenv\joyoo\lib\site-packages\django\utils\log.py [line:228] ERROR Internal Server Error: /friendUrlAdd/ Traceback (most recent call last): File "E:\py_virtualenv\j
卓越笔记
2023/02/18
2180
django2.2 TypeError: render() got an unexpected keyword argument 'renderer'
从Django 1.11 迁移到 Django 2.2 后 AdminFileWidget 的 render 报错了:
卓越笔记
2023/02/18
4970
pd.MultiIndex() TypeError: __new__() got an unexpected keyword argument 'labels
可以看到pd.MultiIndex()并没有labels参数,与labels功能相同的是codes参数,查看https://pandas.pydata.org/pandas-docs/stable/user_guide/advanced.html可以看到:
迷乐
2021/02/17
2.3K0
django_filters TypeError: __init__() got an unexpected keyword argument 'name'
django-filter 参数名字已经由 name 更改为 field_name
卓越笔记
2023/02/18
5260
mv argument list too long错误
家中领导负责的一个系统,在清理过期文件的时候,提示了个错误,是时候展示真正的技术了,
bisal
2020/02/21
2.3K0
mv argument list too long错误
[已解决]报错:ValueError: Expected 2D array, got scalar array instead
值错误:应为二维数组,而得到的是一维数组: 使用array重新调整数据的形状。如果数据有单个功能或数组,则重新调整形状(-1,1)。如果数据包含单个示例,则重新调整形状(1,-1)。
hankleo
2020/09/17
2.4K0
mybatis映射xml配置文件报错:<statement> or DELIMITER expected, got ‘id‘
编写mybatis生成的xml文件时,发现sql节点内报错。 这是IDEA的bug,发生在MyBatis的Mapper的XML文件的sql节点上,第一个字段是什么错误中最后一个单引号内部就是什么。
JavaEdge
2021/02/23
4.3K1
mybatis映射xml配置文件报错:<statement> or DELIMITER expected, got ‘id‘
Celery ValueError: not enough values to unpack (expected 3, got 0) 的解决方法(windows)
网上检索到资料 https://github.com/celery/celery/issues/4081
卓越笔记
2023/02/18
1.1K0

相似问题

按升序和降序对链表进行排序

20

按降序对向量进行排序

107

按降序(反向)对TreeMultimap进行排序

29

如何按降序对值进行排序

20

按几列对numpy进行降序排序

14
添加站长 进交流群

领取专属 10元无门槛券

AI混元助手 在线答疑

扫码加入开发者社群
关注 腾讯云开发者公众号

洞察 腾讯核心技术

剖析业界实践案例

扫码关注腾讯云开发者公众号
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
查看详情【社区公告】 技术创作特训营有奖征文