当我尝试为 ProfileMFAPhoneNumber 上传 B2C 自定义策略时收到验证错误

时间:2021-07-16 07:33:34

标签: azure azure-active-directory azure-ad-b2c-custom-policy

我刚开始使用 Azure AD B2C,实际上,我正在尝试上传自定义策略并收到此错误消息

验证失败:在租户“yourtenant.onmicrosoft.com”的策略“B2C_1A_EDIT_MFA”中发现 1 个验证错误。带有“policyId”的策略:B2C_1A_EDIT_MFA_TRUSTFRAMEWORKEXTENSIONS 在目录 '9fb5a2ef-1b-1daf 中找不到d037167e4474'.Policy with 'policyId': B2C_1A_EDIT_MFA_TRUSTFRAMEWORKEXTENSIONS 在目录 '9fb5a2ef-1daf-482b-b390-d037167e4474' 中找不到。

我的自定义策略有这个 xml 代码:

<?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>

如果有人帮助我上传自定义政策,我将不胜感激。

2 个答案:

答案 0 :(得分:0)

您似乎错过了上传包含引用策略“B2C_1A_Edit_MFA_TrustFrameworkExtensions”定义的基本文件和扩展文件

我建议您阅读本文以了解有关自定义政策的基础知识: Tutorial: Create user flows and custom policies in Azure Active Directory B2C

答案 1 :(得分:0)

yourtenant.onmicrosoft.com?

yourtenant 需要替换为租户的名字

相关问题