【问题标题】:Azure AD B2C - include mobile phone number used for MFA in id tokenAzure AD B2C - 在 id 令牌中包含用于 MFA 的手机号码
【发布时间】:2019-02-01 10:52:26
【问题描述】:

我正在使用 Azure AD B2C。

我创建了一个启用多因素身份验证的注册 v2 用户流程。当我运行用户流程并通过 SMS 向我指定的手机号码执行包括 MFA 在内的注册过程时,我将返回到我已配置的回复 URL - jwt.ms。

id 令牌具有返回声明,包括我的电子邮件地址以及我配置为返回的其他属性,但与用于 MFA 的手机号码无关。似乎没有办法配置用户流以将其包含在退货声明中。有谁知道这是否可行,如果可以,该怎么做?

干杯。

【问题讨论】:

    标签: azure oauth-2.0 azure-ad-b2c openid-connect


    【解决方案1】:

    电话号码从 user 对象的 strongAuthenticationPhoneNumber 属性中读取和写入。

    目前,此属性不可用于内置策略(即用户流),但可用于自定义策略。

    如果您使用the custom policy starter pack for MFA,那么您可以添加 strongAuthenticationPhoneNumber 声明,作为 ID 令牌中的传出声明,如下所示:

    <RelyingParty>
      <DefaultUserJourney ReferenceId="SignUpOrSignIn" />
      <TechnicalProfile Id="PolicyProfile">
        <DisplayName>PolicyProfile</DisplayName>
        <Protocol Name="OpenIdConnect" />
        <OutputClaims>
          ...
          <OutputClaim ClaimTypeReferenceId="strongAuthenticationPhoneNumber" PartnerClaimType="phone_number" />
        </OutputClaims>
        <SubjectNamingInfo ClaimType="sub" />
      </TechnicalProfile>
    </RelyingParty>
    

    【讨论】:

    • 谢谢克里斯。下周我会试试这个,让你知道我是怎么走的。干杯。
    猜你喜欢
    • 2021-05-17
    • 1970-01-01
    • 2021-03-03
    • 1970-01-01
    • 2021-08-17
    • 2017-11-23
    • 2019-05-28
    • 1970-01-01
    • 2022-08-05
    相关资源
    最近更新 更多