Azure ad b2c 电话因素国家/地区列表

Azure ad b2c 电话因素国家/地区列表,azure-ad-b2c,identity-experience-framework,Azure Ad B2c,Identity Experience Framework,我正在将PhoneFactor InputOrVerify用于我的自定义策略MFA。如果用户没有注册电话号码,则会要求他们输入一个。其中一部分是手机注册所在国家的下拉列表(以便获取国家代码)。我已经使用以下技术文件将这个列表缩减到了几个国家 <TechnicalProfile Id="PhoneFactor-InputOrVerify"> <DisplayName>PhoneFactor</DisplayName> <

我正在将PhoneFactor InputOrVerify用于我的自定义策略MFA。如果用户没有注册电话号码,则会要求他们输入一个。其中一部分是手机注册所在国家的下拉列表(以便获取国家代码)。我已经使用以下技术文件将这个列表缩减到了几个国家

<TechnicalProfile Id="PhoneFactor-InputOrVerify">
    <DisplayName>PhoneFactor</DisplayName>
    <Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.PhoneFactorProtocolProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
    <Metadata>
        <Item Key="ContentDefinitionReferenceId">api.phonefactor</Item>
        <Item Key="ManualPhoneNumberEntryAllowed">true</Item>
        <Item Key="setting.authenticationMode">sms</Item>
        <Item Key="setting.autodial">true</Item>     
        <Item Key="language.countryList"><![CDATA[{"IE": "Ireland","IM": "Isle of Man","GB": "United Kingdom","US": "United States","DE": "Germany"}]]></Item>
    </Metadata>
    <CryptographicKeys>
        <Key Id="issuer_secret" StorageReferenceId="B2C_1A_TokenSigningKeyContainer" />
    </CryptographicKeys>
    <InputClaimsTransformations>
        <InputClaimsTransformation ReferenceId="CreateUserIdForMFA" />
    </InputClaimsTransformations>
    <InputClaims>
        <InputClaim ClaimTypeReferenceId="userIdForMFA" PartnerClaimType="UserId" />
        <InputClaim ClaimTypeReferenceId="strongAuthenticationPhoneNumber" />
    </InputClaims>
    <OutputClaims>
        <OutputClaim ClaimTypeReferenceId="Verified.strongAuthenticationPhoneNumber" PartnerClaimType="Verified.OfficePhone" />
        <OutputClaim ClaimTypeReferenceId="newPhoneNumberEntered" PartnerClaimType="newPhoneNumberEntered" />
        <OutputClaim ClaimTypeReferenceId="isActiveMFASession" DefaultValue="true"/>
    </OutputClaims>
</TechnicalProfile>

音素
api.phonefactor
真的
短讯服务
真的
问题是它总是默认为美国,我希望能够设置下拉列表默认的国家代码。有人知道我是怎么做到的吗


我尝试过在JSON的开头添加
“DEFAULT”:“United Kingdom”,
,但是,只是在列表中添加了另一个选择。

您尝试过将
“GB”:“United Kingdom”
移动到列表前面并删除
“DEFAULT”:“Country/Region”

另一种可能是使用Java脚本自定义下拉列表,但仅建议在无法通过策略实现此行为时使用

下面是一个工作示例,我已经更新了B2C中使用特性的策略。基本上将GB移到了Country_列表项的顶部,并删除了默认条目


目前,它默认为美国,排名第四。希望避免使用JavaScript,因为这可能会导致其他问题。所以这不能让英国成为首选吗?否如果我去掉默认值,它仍然默认为美国:(您是否可以尝试更新语言文件,然后在策略中使用该文件,而不是在技术配置文件中使用元数据?您可以查看我在上面添加的示例文件。在将GB放在第一位并删除默认值后,该文件按预期工作。这让我相信,技术配置文件中的元数据方法存在一些不正确的地方NIC配置文件。抱歉,可能错过了您的部分答案,因为我在周末使用iPad应用程序阅读它。我刚刚重构了我的策略文件,将语言设置移动到ContentDefinition中,正如您建议的那样。必须承认,不同时使用这两种方式是没有意义的,但至少它可以工作。谢谢
{
  "LocalizedStrings": [
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "alternative_text",
      "Override": false,
      "Value": "I don't have my phone"
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "button_cancel",
      "Override": false,
      "Value": "Cancel"
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "button_retry",
      "Override": false,
      "Value": "Retry"
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "button_send_code",
      "Override": false,
      "Value": "Send Code"
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "button_verify",
      "Override": false,
      "Value": "Call Me"
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "button_verify_code",
      "Override": false,
      "Value": "Verify Code"
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "cancel_message",
      "Override": false,
      "Value": "The user has cancelled multi-factor authentication"
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "code_pattern",
      "Override": false,
      "Value": "\\d{6}"
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "countryList",
      "Override": true,
      "Value": "{\"GB\":\"United Kingdom\", \"AF\":\"Afghanistan\",\"AX\":\"Åland Islands\",\"AL\":\"Albania\",\"DZ\":\"Algeria\",\"AS\":\"American Samoa\",\"AD\":\"Andorra\",\"AO\":\"Angola\",\"AI\":\"Anguilla\",\"AQ\":\"Antarctica\",\"AG\":\"Antigua and Barbuda\",\"AR\":\"Argentina\",\"AM\":\"Armenia\",\"AW\":\"Aruba\",\"AU\":\"Australia\",\"AT\":\"Austria\",\"AZ\":\"Azerbaijan\",\"BS\":\"Bahamas\",\"BH\":\"Bahrain\",\"BD\":\"Bangladesh\",\"BB\":\"Barbados\",\"BY\":\"Belarus\",\"BE\":\"Belgium\",\"BZ\":\"Belize\",\"BJ\":\"Benin\",\"BM\":\"Bermuda\",\"BT\":\"Bhutan\",\"BO\":\"Bolivia\",\"BQ\":\"Bonaire\",\"BA\":\"Bosnia and Herzegovina\",\"BW\":\"Botswana\",\"BV\":\"Bouvet Island\",\"BR\":\"Brazil\",\"IO\":\"British Indian Ocean Territory\",\"VG\":\"British Virgin Islands\",\"BN\":\"Brunei\",\"BG\":\"Bulgaria\",\"BF\":\"Burkina Faso\",\"BI\":\"Burundi\",\"CV\":\"Cabo Verde\",\"KH\":\"Cambodia\",\"CM\":\"Cameroon\",\"CA\":\"Canada\",\"KY\":\"Cayman Islands\",\"CF\":\"Central African Republic\",\"TD\":\"Chad\",\"CL\":\"Chile\",\"CN\":\"China\",\"CX\":\"Christmas Island\",\"CC\":\"Cocos (Keeling) Islands\",\"CO\":\"Colombia\",\"KM\":\"Comoros\",\"CG\":\"Congo\",\"CD\":\"Congo (DRC)\",\"CK\":\"Cook Islands\",\"CR\":\"Costa Rica\",\"CI\":\"Côte d’Ivoire\",\"HR\":\"Croatia\",\"CU\":\"Cuba\",\"CW\":\"Curaçao\",\"CY\":\"Cyprus\",\"CZ\":\"Czechia\",\"DK\":\"Denmark\",\"DJ\":\"Djibouti\",\"DM\":\"Dominica\",\"DO\":\"Dominican Republic\",\"EC\":\"Ecuador\",\"EG\":\"Egypt\",\"SV\":\"El Salvador\",\"GQ\":\"Equatorial Guinea\",\"ER\":\"Eritrea\",\"EE\":\"Estonia\",\"SZ\":\"Eswatini\",\"ET\":\"Ethiopia\",\"FK\":\"Falkland Islands\",\"FO\":\"Faroe Islands\",\"FJ\":\"Fiji\",\"FI\":\"Finland\",\"FR\":\"France\",\"GF\":\"French Guiana\",\"PF\":\"French Polynesia\",\"TF\":\"French Southern Territories\",\"GA\":\"Gabon\",\"GM\":\"Gambia\",\"GE\":\"Georgia\",\"DE\":\"Germany\",\"GH\":\"Ghana\",\"GI\":\"Gibraltar\",\"GR\":\"Greece\",\"GL\":\"Greenland\",\"GD\":\"Grenada\",\"GP\":\"Guadeloupe\",\"GU\":\"Guam\",\"GT\":\"Guatemala\",\"GG\":\"Guernsey\",\"GN\":\"Guinea\",\"GW\":\"Guinea-Bissau\",\"GY\":\"Guyana\",\"HT\":\"Haiti\",\"HM\":\"Heard Island and McDonald Islands\",\"HN\":\"Honduras\",\"HK\":\"Hong Kong SAR\",\"HU\":\"Hungary\",\"IS\":\"Iceland\",\"IN\":\"India\",\"ID\":\"Indonesia\",\"IR\":\"Iran\",\"IQ\":\"Iraq\",\"IE\":\"Ireland\",\"IM\":\"Isle of Man\",\"IL\":\"Israel\",\"IT\":\"Italy\",\"JM\":\"Jamaica\",\"JP\":\"Japan\",\"JE\":\"Jersey\",\"JO\":\"Jordan\",\"KZ\":\"Kazakhstan\",\"KE\":\"Kenya\",\"KI\":\"Kiribati\",\"KR\":\"Korea\",\"KW\":\"Kuwait\",\"KG\":\"Kyrgyzstan\",\"LA\":\"Laos\",\"LV\":\"Latvia\",\"LB\":\"Lebanon\",\"LS\":\"Lesotho\",\"LR\":\"Liberia\",\"LY\":\"Libya\",\"LI\":\"Liechtenstein\",\"LT\":\"Lithuania\",\"LU\":\"Luxembourg\",\"MO\":\"Macao SAR\",\"MG\":\"Madagascar\",\"MW\":\"Malawi\",\"MY\":\"Malaysia\",\"MV\":\"Maldives\",\"ML\":\"Mali\",\"MT\":\"Malta\",\"MH\":\"Marshall Islands\",\"MQ\":\"Martinique\",\"MR\":\"Mauritania\",\"MU\":\"Mauritius\",\"YT\":\"Mayotte\",\"MX\":\"Mexico\",\"FM\":\"Micronesia\",\"MD\":\"Moldova\",\"MC\":\"Monaco\",\"MN\":\"Mongolia\",\"ME\":\"Montenegro\",\"MS\":\"Montserrat\",\"MA\":\"Morocco\",\"MZ\":\"Mozambique\",\"MM\":\"Myanmar\",\"NA\":\"Namibia\",\"NR\":\"Nauru\",\"NP\":\"Nepal\",\"NL\":\"Netherlands\",\"NC\":\"New Caledonia\",\"NZ\":\"New Zealand\",\"NI\":\"Nicaragua\",\"NE\":\"Niger\",\"NG\":\"Nigeria\",\"NU\":\"Niue\",\"NF\":\"Norfolk Island\",\"KP\":\"North Korea\",\"MK\":\"North Macedonia\",\"MP\":\"Northern Mariana Islands\",\"NO\":\"Norway\",\"OM\":\"Oman\",\"PK\":\"Pakistan\",\"PW\":\"Palau\",\"PS\":\"Palestinian Authority\",\"PA\":\"Panama\",\"PG\":\"Papua New Guinea\",\"PY\":\"Paraguay\",\"PE\":\"Peru\",\"PH\":\"Philippines\",\"PN\":\"Pitcairn Islands\",\"PL\":\"Poland\",\"PT\":\"Portugal\",\"PR\":\"Puerto Rico\",\"QA\":\"Qatar\",\"RE\":\"Réunion\",\"RO\":\"Romania\",\"RU\":\"Russia\",\"RW\":\"Rwanda\",\"BL\":\"Saint Barthélemy\",\"KN\":\"Saint Kitts and Nevis\",\"LC\":\"Saint Lucia\",\"MF\":\"Saint Martin\",\"PM\":\"Saint Pierre and Miquelon\",\"VC\":\"Saint Vincent and the Grenadines\",\"WS\":\"Samoa\",\"SM\":\"San Marino\",\"ST\":\"São Tomé and Príncipe\",\"SA\":\"Saudi Arabia\",\"SN\":\"Senegal\",\"RS\":\"Serbia\",\"SC\":\"Seychelles\",\"SL\":\"Sierra Leone\",\"SG\":\"Singapore\",\"SX\":\"Sint Maarten\",\"SK\":\"Slovakia\",\"SI\":\"Slovenia\",\"SB\":\"Solomon Islands\",\"SO\":\"Somalia\",\"ZA\":\"South Africa\",\"GS\":\"South Georgia and South Sandwich Islands\",\"SS\":\"South Sudan\",\"ES\":\"Spain\",\"LK\":\"Sri Lanka\",\"SH\":\"St Helena, Ascension, Tristan da Cunha\",\"SD\":\"Sudan\",\"SR\":\"Suriname\",\"SJ\":\"Svalbard\",\"SE\":\"Sweden\",\"CH\":\"Switzerland\",\"SY\":\"Syria\",\"TW\":\"Taiwan\",\"TJ\":\"Tajikistan\",\"TZ\":\"Tanzania\",\"TH\":\"Thailand\",\"TL\":\"Timor-Leste\",\"TG\":\"Togo\",\"TK\":\"Tokelau\",\"TO\":\"Tonga\",\"TT\":\"Trinidad and Tobago\",\"TN\":\"Tunisia\",\"TR\":\"Turkey\",\"TM\":\"Turkmenistan\",\"TC\":\"Turks and Caicos Islands\",\"TV\":\"Tuvalu\",\"UM\":\"U.S. Outlying Islands\",\"VI\":\"U.S. Virgin Islands\",\"UG\":\"Uganda\",\"UA\":\"Ukraine\",\"AE\":\"United Arab Emirates\",\"US\":\"United States\",\"UY\":\"Uruguay\",\"UZ\":\"Uzbekistan\",\"VU\":\"Vanuatu\",\"VA\":\"Vatican City\",\"VE\":\"Venezuela\",\"VN\":\"Vietnam\",\"WF\":\"Wallis and Futuna\",\"YE\":\"Yemen\",\"ZM\":\"Zambia\",\"ZW\":\"Zimbabwe\"}"
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "country_code_input_placeholder_text",
      "Override": false,
      "Value": "Country or region"
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "country_code_label",
      "Override": false,
      "Value": "Country Code"
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "enter_code_text_intro",
      "Override": false,
      "Value": "Enter your verification code below, or "
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "error_448",
      "Override": false,
      "Value": "The phone number you provided is unreachable."
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "error_449",
      "Override": false,
      "Value": "User has exceeded the number of retry attempts."
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "error_incorrect_code",
      "Override": false,
      "Value": "The verification code you have entered does not match our records. Please try again, or request a new code."
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "error_tryagain",
      "Override": false,
      "Value": "The phone number you provided is busy or unavailable. Please check the number and try again."
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "intro_entry_mixed",
      "Override": false,
      "Value": "Enter a number below that we can send a code via SMS or phone to authenticate you."
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "intro_entry_phone",
      "Override": false,
      "Value": "Enter a number below that we can phone to authenticate you."
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "intro_entry_sms",
      "Override": false,
      "Value": "Enter a number below that we can send a code via SMS to authenticate you."
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "intro_mixed",
      "Override": false,
      "Value": "We have the following number on record for you. We can send a code via SMS or phone to authenticate you."
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "intro_mixed_p",
      "Override": false,
      "Value": "We have the following numbers on record for you. Choose a number that we can phone or send a code via SMS to authenticate you."
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "intro_phone",
      "Override": false,
      "Value": "We have the following number on record for you. We will phone to authenticate you."
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "intro_phone_p",
      "Override": false,
      "Value": "We have the following numbers on record for you.  Choose a number that we can phone to authenticate you."
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "intro_sms",
      "Override": false,
      "Value": "We have the following number on record for you. We will send a code via SMS to authenticate you."
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "intro_sms_p",
      "Override": false,
      "Value": "We have the following numbers on record for you. Choose a number that we can send a code via SMS to authenticate you."
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "invalid_code",
      "Override": false,
      "Value": "Please enter the 6 digit code you received"
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "invalid_number",
      "Override": false,
      "Value": "Please enter a valid phone number"
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "local_number_input_placeholder_text",
      "Override": false,
      "Value": "Phone number"
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "number_label",
      "Override": false,
      "Value": "Phone Number"
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "number_pattern",
      "Override": false,
      "Value": "^\\+(?:[0-9][\\x20-]?){6,14}[0-9]$"
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "requiredField_code",
      "Override": false,
      "Value": "Please enter the verification code you received"
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "requiredField_countryCode",
      "Override": false,
      "Value": "Please select your country code"
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "requiredField_number",
      "Override": false,
      "Value": "Please enter your phone number"
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "text_button_send_second_code",
      "Override": false,
      "Value": "send a new code"
    },
    {
      "ElementType": "UxElement",
      "ElementId": null,
      "StringId": "verification_code_input_placeholder_text",
      "Override": false,
      "Value": "Verification code"
    }
  ]
}