Skip to content

Commit 55f62be

Browse files
authored
Update phone-based-mfa.md to add steps to mitigate fraudulent SMS via custom policy
The article has been updated with tested steps to mitigate fraudulent SMS activity using custom policy. Additionally, the importance of override in user flow and its correct usage has been emphasized
1 parent 16850fc commit 55f62be

File tree

1 file changed

+49
-2
lines changed

1 file changed

+49
-2
lines changed

articles/active-directory-b2c/phone-based-mfa.md

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ You can use the workbook to understand phone-based MFA events and identify poten
8282
3. Mitigate fraudulent sign-ups by following the steps in the next section.
8383

8484

85-
## Mitigate fraudulent sign-ups
85+
## Mitigate fraudulent sign-ups for user flow
8686

8787
Take the following actions to help mitigate fraudulent sign-ups.
8888

@@ -97,12 +97,15 @@ Take the following actions to help mitigate fraudulent sign-ups.
9797
1. Sign in to the [Azure portal](https://portal.azure.com) as the [External ID User Flow Administrator](/entra/identity/role-based-access-control/permissions-reference#external-id-user-flow-administrator) of your Azure AD B2C tenant.
9898
1. If you have access to multiple tenants, select the **Settings** icon in the top menu to switch to your Azure AD B2C tenant from the **Directories + subscriptions** menu.
9999
1. Choose **All services** in the top-left corner of the Azure portal, search for and select **Azure AD B2C**.
100-
1. Select the user flow, and then select **Languages**. Select the language for your organization's geographic location to open the language details panel. (For this example, we'll select **English en** for the United States). Select **Multifactor authentication page**, and then select **Download defaults (en)**.
100+
1. Select the user flow, and then select **Languages**. Select the language for your organization's primary geographic location to open the language details panel. (For this example, we'll select **English en** for the United States). Select **Multifactor authentication page**, and then select **Download defaults (en)**.
101101

102102
![Upload new overrides to download defaults](media/phone-based-mfa/download-defaults.png)
103103

104104
1. Open the JSON file that was downloaded in the previous step. In the file, search for `DEFAULT`, and replace the line with `"Value": "{\"DEFAULT\":\"Country/Region\",\"US\":\"United States\"}"`. Be sure to set `Overrides` to `true`.
105105

106+
> [!IMPORTANT]
107+
> To implement SMS blocking effectively, please ensure that the Overrides setting is enabled (true) only for the primary or default language used in your business. Avoid enabling overrides for any non-primary languages, as doing so may lead to unintended SMS blocking behavior. Since the countryList in the JSON file functions as an allow list, please include all countries permitted to send SMS within this list for the primary language configuration when Overrides is set to true.
108+
106109
> [!NOTE]
107110
> You can customize the list of allowed country codes in the `countryList` element (see the [Phone factor authentication page example](localization-string-ids.md#phone-factor-authentication-page-example)).
108111
@@ -111,6 +114,50 @@ Take the following actions to help mitigate fraudulent sign-ups.
111114

112115
![Country code drop-down](media/phone-based-mfa/country-code-drop-down.png)
113116

117+
## Mitigate fraudulent sign-ups for custom policy
118+
119+
Take the following actions to help mitigate fraudulent sign-ups:
120+
121+
1. Identify the policy file where RelyingParty is defined. In the sample [Starter Pack](https://github.com/Azure-Samples/active-directory-b2c-custom-policy-starterpack) this is the SignUpOrSignin.xml file
122+
2. Add the following code within the "BuildingBlocks" section:
123+
124+
```xml
125+
<BuildingBlocks>
126+
127+
<ContentDefinitions>
128+
<ContentDefinition Id="api.phonefactor">
129+
<LoadUri>~/tenant/templates/AzureBlue/multifactor-1.0.0.cshtml</LoadUri>
130+
<DataUri>urn:com:microsoft:aad:b2c:elements:contract:multifactor:1.2.20</DataUri>
131+
<Metadata>
132+
<Item Key="TemplateId">azureBlue</Item>
133+
</Metadata>
134+
<LocalizedResourcesReferences MergeBehavior="Prepend">
135+
<!-- Add only primary business language here -->
136+
<LocalizedResourcesReference Language="en" LocalizedResourcesReferenceId="api.phonefactor.en" />
137+
</LocalizedResourcesReferences>
138+
</ContentDefinition>
139+
</ContentDefinitions>
140+
141+
<Localization Enabled="true">
142+
<SupportedLanguages DefaultLanguage="en" MergeBehavior="ReplaceAll">
143+
<!-- Add only primary business language here -->
144+
<SupportedLanguage>en</SupportedLanguage>
145+
</SupportedLanguages>
146+
147+
<!-- Phone factor for primary business language -->
148+
<LocalizedResources Id="api.phonefactor.en">
149+
<LocalizedStrings>
150+
<LocalizedString ElementType="UxElement" StringId="countryList">{"DEFAULT":"Country/Region","JP":"Japan","BG":"Bulgaria","US":"United States"}</LocalizedString>
151+
</LocalizedStrings>
152+
</LocalizedResources>
153+
</Localization>
154+
155+
</BuildingBlocks>
156+
```
157+
158+
> [!NOTE]
159+
> The countryList functions as an allow list; therefore, only the countries specified within it (e.g., Japan, Bulgaria, and the United States) will be permitted to use MFA, while all other countries will be blocked.
160+
114161
## Related content
115162

116163
- Learn about [Identity Protection and Conditional Access for Azure AD B2C](conditional-access-identity-protection-overview.md)

0 commit comments

Comments
 (0)