Azure AD B2C-在ID令牌中包含用于MFA的手机号码

时间:2019-01-31 04:07:01

标签: azure oauth-2.0 azure-ad-b2c oidc

我正在使用Azure AD B2C。

我已经创建了启用多因素身份验证的注册v2用户流程。当我运行用户流并完成注册过程(包括通过短信发送MFA到我指定的手机号码)时,我将返回到已配置的回复URL-jwt.ms。

id令牌具有退回声明,包括我的电子邮件地址以及已配置为退回的其他属性,但与用于MFA的移动电话号码无关。似乎没有一种方法可以配置用户流程以将其包括在退货声明中。有人知道这是否可行吗?

干杯。

1 个答案:

答案 0 :(得分: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>
相关问题