注册时在联系信息中存储 "mobilePhone" - Azure AD B2C 自定义策略 + MFA

Store "mobilePhone" in contact info during registration - Azure AD B2C Custom policy + MFA

如何在 SignUp/Registration 期间使用 Azure AD B2C 自定义策略中的 MFA 存储移动 Phone 号码。 我们可以用来指代移动设备的声明名称是什么 Phone

您可以使用“手机”属性 here 访问和存储手机 phone。

要实际执行此操作,您需要按照 this document 中的步骤操作。例如,链接代码添加了“城市”声明,您需要将“城市”替换为“移动”

<!-- 
<BuildingBlocks>
  <ClaimsSchema> -->
    <ClaimType Id="mobile">
      <DisplayName>Mobile Phone</DisplayName>
      <DataType>string</DataType>
      <UserInputType>TextBox</UserInputType>
    </ClaimType>
  <!-- 
  </ClaimsSchema>
</BuildingBlocks>-->