Azure Active Directory B2C Phone Sign Up/Sign In Filter to Certain Countries

Michael Ridland 0 Reputation points
2023-05-17T07:01:10.5766667+00:00

I've currently setup Azure Active Directory B2C for users to sign in via a phone OTP. I need to limited the phone numbers to be only countries the application is supported in.

I've not found a way to do this yet or any documentation on this.

NB* this is not the MFA it's login via phone number.

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
3,130 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
24,191 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Shweta Mathur 30,271 Reputation points Microsoft Employee
    2023-05-18T05:59:42.13+00:00

    Hi @Michael Ridland ,

    To limit the country list in Phone Sign In/Sign Up in Azure ADB2C User Flow does not provide country list in default Json File.
    To update the country, drop down list with selected countries you need to update the JSON page of Phone Sign in.

    To update the Phone Sign in page,

    1.Click Your User Flow

    2.Languages -> Click 'Enable Language Customization' in the menu if it's not enabled

    3.Select the language

    4.Click phone signin page in flyout menu and download the defaults json

    User's image

    5.Then add this in the end of json file

    "LocalizedCollections": [
        {
          "ElementType": "ClaimType",
          "ElementId": "countryCode",
          "TargetCollection": "Restriction",
          "Override": true,
          "Items": [
            {
              "Name": "India(+91)",
              "Value": "IN"
            }
          ]
        }
      ]
    

    and upload the JSON to reflect the changes.

    Hope this will help.

    Thanks,

    Shweta


    Please remember to "Accept Answer" if answer helped you.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.