【问题标题】:Change Password with Custom Policy使用自定义策略更改密码
【发布时间】:2020-11-17 17:10:25
【问题描述】:

我们关注https://docs.microsoft.com/en-us/azure/active-directory-b2c/custom-policy-password-change#:~:text=Choose%20All%20services%20in%20the,for%20and%20select%20the%20TrustframeworkExtensions。通过自定义策略设置更改密码。 正面场景效果很好,但是,如果用户提供了不正确的旧密码,我们会收到一条消息“请求中提供的用户名或密码无效”。没有找到消息来自哪里。 任何线索都会有所帮助。

【问题讨论】:

  • 请帮忙。
  • 它应该来自ContentDefinition Id="api.selfasserted"。如果您想自定义它,请查看此答案:stackoverflow.com/questions/46798311/…。
  • 嗨,是的,它应该在 api.selfasserted 中,但是你有我可以在本地化文本中输入的字符串 id。我在 MS 文档中找不到 id。

标签: azure-ad-b2c identity-experience-framework azure-ad-b2c-custom-policy


【解决方案1】:

在元数据中验证您的验证技术配置文件,并确认这是否是信息。见下面的例子:

      <TechnicalProfiles>
    <TechnicalProfile Id="login-NonInteractive">
      <DisplayName>Local Account SignIn</DisplayName>
      <Protocol Name="OpenIdConnect" />
      <Metadata>
        <Item Key="UserMessageIfClaimsPrincipalDoesNotExist">We can't seem to find your account</Item>
        <Item Key="UserMessageIfInvalidPassword">**Your password is incorrect**</Item>
        <Item Key="UserMessageIfOldPasswordUsed">Looks like you used an old password</Item>

        <Item Key="ProviderName">https://sts.windows.net/</Item>
        <Item Key="METADATA">https://login.microsoftonline.com/{tenant}/.well-known/openid-configuration</Item>
        <Item Key="authorization_endpoint">https://login.microsoftonline.com/{tenant}/oauth2/token</Item>
        <Item Key="response_types">id_token</Item>
        <Item Key="response_mode">query</Item>
        <Item Key="scope">email openid</Item>
        <Item Key="grant_type">password</Item>

        <!-- Policy Engine Clients -->
        <Item Key="UsePolicyInRedirectUri">false</Item>
        <Item Key="HttpBinding">POST</Item>
      </Metadata>

【讨论】:

    猜你喜欢
    • 2023-01-17
    • 1970-01-01
    • 2021-01-08
    • 1970-01-01
    • 2021-03-15
    • 2018-07-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多