I'm using the PhoneFactor-InputOrVerify for my custom policy MFA. If a user does not have a phone number registered, it will ask them to enter one. Part of this is a dropdown list of countries that the phone is registered in (so that it can get the country code). I've managed to trim this list down to just a few countries, using the following TechnicalProfile
<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>
The problem is that it always defaults to the United States, I want to be able to set what country code the dropdown defaults to. Anyone know how I do this?
I've tried adding "DEFAULT": "United Kingdom",
to the start of the JSON however, just just adds another selection to the list.
Have you tried moving
"GB": "United Kingdom"
in front of the list and removing"DEFAULT": "Country/Region"
?Another possibility is to use Java Script to customize the dropdown but would only recommend that if this behavior is not achievable via policy.
Here is a working example where I have updated the policy to use language customization feature in B2C. Basically moved the GB at the top of Country_List item and remove entry for DEFAULT.