4

I am new to using Azure AD B2C, actually, I am trying to uploading custom policy and getting this error message

Validation failed: 1 validation error(s) found in policy "B2C_1A_EDIT_MFA" of tenant "yourtenant.onmicrosoft.com".Policy with 'policyId': B2C_1A_EDIT_MFA_TRUSTFRAMEWORKEXTENSIONS cannot be found in the directory '9fb5a2ef-1daf-482b-b390-d037167e4474'.Policy with 'policyId': B2C_1A_EDIT_MFA_TRUSTFRAMEWORKEXTENSIONS cannot be found in the directory '9fb5a2ef-1daf-482b-b390-d037167e4474'.

My custom policy has this xml code:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TrustFrameworkPolicy
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns="http://schemas.microsoft.com/online/cpim/schemas/2013/06"
  PolicySchemaVersion="0.3.0.0"
  TenantId="yourtenant.onmicrosoft.com"
  PolicyId="B2C_1A_Edit_MFA"
  PublicPolicyUri="http://yourtenant.onmicrosoft.com/B2C_1A_Edit_MFA">

  <BasePolicy>
    <TenantId>yourtenant.onmicrosoft.com</TenantId>
    <PolicyId>B2C_1A_Edit_MFA_TrustFrameworkExtensions</PolicyId>
  </BasePolicy>

  <RelyingParty>
    <DefaultUserJourney ReferenceId="EditMFAPhoneNumber" />
    <TechnicalProfile Id="PolicyProfile">
      <DisplayName>PolicyProfile</DisplayName>
      <Protocol Name="OpenIdConnect" />
      <OutputClaims>
        <OutputClaim ClaimTypeReferenceId="objectId" PartnerClaimType="sub"/>
      </OutputClaims>
      <SubjectNamingInfo ClaimType="sub" />
    </TechnicalProfile>
  </RelyingParty>
</TrustFrameworkPolicy>

will appreciate it if someone helps me in uploading the custom policy.

2 Answers2

1

yourtenant.onmicrosoft.com?

yourtenant needs to be replace with the name of tenant

LarryX
  • 591
  • 2
  • 7
0

It looks like you have missed uploading the Base- and Extension file that contains the definition of the referenced policy "B2C_1A_Edit_MFA_TrustFrameworkExtensions"

I would suggest that you have a look at this article to learn the basics about custom policies: Tutorial: Create user flows and custom policies in Azure Active Directory B2C

Martin Brandl
  • 56,134
  • 13
  • 133
  • 172
  • I already go through this document and I successfully created, B2C_1_editprofile, B2C_1_passwordreset, B2C_1_ROPC_Auth, B2C_1_signupsignin, and this user flow working fine. I need a custom policy that helps me in getting a verified phone number. that's why I am adding ProfileMFAPhoneNumber in the Identity Experience Framework. – Muhammad Usman Jul 16 '21 at 08:09