Azure B2C错误'无法验证提供的信息。使用自定义属性时 [英] Azure B2c error 'Unable to validate the information provided.' when using custom attributes

查看:17
本文介绍了Azure B2C错误'无法验证提供的信息。使用自定义属性时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将自定义属性添加到自定义策略。但是,它会生成此错误"无法验证提供的信息。"

我按照下面的链接文档操作,我已经添加了应用程序id b2c-扩展-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.";

我的TrustFrameworkExages文件中的部分代码,它在其中写入和检索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

这篇关于Azure B2C错误&#39;无法验证提供的信息。使用自定义属性时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆