azure - Azure B2c 错误“无法验证提供的信息。” 使用自定义属性时
问题描述
我正在尝试将自定义属性添加到自定义策略中。但是,它会生成此错误“无法验证所提供的信息”。
我遵循了以下链接的文档,我已经添加了应用程序 id b2c-extensions-app 和对象。
https://docs.microsoft.com/pt-br/azure/active-directory-b2c/custom-policy-custom-attributes
错误日志消息“返回的错误是 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 元数据配置错误。
确保遵循此处的教程。
推荐阅读
- jquery - 单击外部后在输入字段中输入时删除美元符号需要在jQuery中显示美元符号
- haskell - 如何使用 concatMap 将列表理解转换为版本?
- symfony - 我正在使用 Nelmio_cors,但我收到 POST 请求的 500 错误,即使我收到了对 GET 请求启用 CORS 的响应
- docker - 无法在 Google-Colab 中启动 docker
- sas - 从分类变量生成虚拟变量
- google-api - 如何将正文内容传递给 gmail Rest API?
- python - go中的楼层划分
- javascript - 在 dotnetcore
- customization - Acumatica:我加入的选择器写得不好吗?
- regex - Bash 兼容的正则表达式(带组)