使用自定义属性时出现 Azure B2c 错误 'Unable to validate the information provided.'

Azure B2c error 'Unable to validate the information provided.' when using custom attributes

我正在尝试将自定义属性添加到自定义策略。但是它会生成此错误 'Unable to validate the information provided.'

我按照下面链接的文档操作,我已经添加了应用程序 ID b2c-extensions-app 和对象。

https://docs.microsoft.com/pt-br/azure/active-directory-b2c/custom-policy-custom-attributes

https://docs.microsoft.com/pt-br/azure/active-directory-b2c/configure-user-input?pivots=b2c-custom-policy

错误日志消息“返回的错误为 400/Request_BadRequest:以下扩展属性不可用:extension_f41be....._tipoUsuario。”

我的 TrustFrameworkExtensions 文件中的部分代码,它在 AD 中写入和检索信息:

<ClaimsProvider>
  <DisplayName>Azure Active Directory</DisplayName>
  <TechnicalProfiles>
    <TechnicalProfile Id="AAD-Common">
      <Metadata>
        <!--Insert b2c-extensions-app application ID here, for example: 11111111-1111-1111-1111-111111111111-->
        <Item Key="5bfd........"></Item>
        <!--Insert b2c-extensions-app application ObjectId here, for example: 22222222-2222-2222-2222-222222222222-->
        <Item Key="18bd6......."></Item>
      </Metadata>
    </TechnicalProfile>
    <TechnicalProfile Id="AAD-UserWriteUsingLogonEmail">
      <Metadata>
        <Item Key="client_id">f41be......</Item>
        <!--Insert b2c-extensions-app application ID here, for example: 11111111-1111-1111-1111-111111111111-->
       
      </Metadata>
      <PersistedClaims>
        <PersistedClaim ClaimTypeReferenceId="extension_tipoUsuario"/>
      </PersistedClaims>
    </TechnicalProfile>
    <!-- Write data during edit profile flow. -->
    <TechnicalProfile Id="AAD-UserWriteProfileUsingObjectId">
     
      <PersistedClaims>
        <PersistedClaim ClaimTypeReferenceId="extension_tipoUsuario"/>
      </PersistedClaims>
    </TechnicalProfile>
    <!-- Read data after user authenticates with a local account. -->
    <TechnicalProfile Id="AAD-UserReadUsingEmailAddress">
      
      <OutputClaims>
        <OutputClaim ClaimTypeReferenceId="extension_tipoUsuario" />
      </OutputClaims>
    </TechnicalProfile>
    <!-- Read data after user authenticates with a federated account. -->
    <TechnicalProfile Id="AAD-UserReadUsingObjectId">
     
      <OutputClaims>
        <OutputClaim ClaimTypeReferenceId="extension_tipoUsuario" />
      </OutputClaims>
    </TechnicalProfile>
  </TechnicalProfiles>
</ClaimsProvider>

此问题的一个常见根本原因是 B2C 扩展应用程序的客户端 ID 元数据配置错误。

确保遵循此处的 tutorial