An Azure AD B2C error related to “supported cultures”

Image showing Vitruvian Man
File:Vitruvian Man Noun project 6674.svg — Wikimedia

I got this weird error when trying to upload a custom policy.

The error was:

“Validation failed: 1 validation error(s) found in policy “B2C_1A_Policy” of tenant “yourtenant.onmicrosoft.com”.

The provided supported cultures list has a duplicate, please remove any duplicate entries”.

I’d never seen this error before and googling found nothing of any consequence 😕

I wondered if “culture” is somehow related to language and I knew that the languages are defined in the “TrustFrameworkLocalization” file.

That file contains:

<Localization Enabled="true">
<SupportedLanguages DefaultLanguage="en" MergeBehavior="Append">
<SupportedLanguage>en</SupportedLanguage>
</SupportedLanguages>

Looking through the other extension files lower down the chain I noticed:

<Localization Enabled="true">
<SupportedLanguages DefaultLanguage="en" MergeBehavior="Append">
<SupportedLanguage>en</SupportedLanguage>
<SupportedLanguage>es</SupportedLanguage>
</SupportedLanguages>

so I commented this out and added the Spanish entry to the localisation file:

<<Localization Enabled="true">
<SupportedLanguages DefaultLanguage="en" MergeBehavior="Append">
<SupportedLanguage>en</SupportedLanguage>
<SupportedLanguage>es</SupportedLanguage>
</SupportedLanguages>

This fixed the problem.

B2C obviously didn’t like the fact that English (“en”) was defined twice / duplicated!

All good!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Rory Braybrook

Rory Braybrook

514 Followers

NZ Microsoft Identity dude and MVP. Azure AD/B2C/ADFS/Auth0/identityserver. StackOverflow: https://bit.ly/2XU4yvJ Presentations: http://bit.ly/334ZPt5