You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure AD B2C中OpenIdConnect带完整URI的Claim映射失败求助

Azure AD B2C自定义策略OpenIdConnect Claim映射异常问题

我已配置用于连接OpenIdConnect身份提供商的技术配置文件,可正常建立连接并获取令牌,但在自定义策略中检索目标Claim时遇到异常。

我的OutputClaim配置代码如下:

<OutputClaim ClaimTypeReferenceId="email" PartnerClaimType="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn" />

在App Insights日志解码后的令牌中,能明确看到该upn Claim及其对应值,但使用映射后的email Claim时,策略提示未找到该Claim。解码令牌片段如下:

"sub": "19804",    
"idp": "test.azure",  
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn": "email.address@email.com",  
"given_name": "Ben"

像sub这类短名称的Claim映射完全正常。我查阅了相关资料,想确认是否因Claim名称包含点导致无法检索?另外我在App Insights中发现两个令牌:

  • My-OpenIdConnect (Jwt)
  • My-OpenIdConnect (Unspecified)
    仅第一个令牌中的Claim可正常输出。

内容的提问来源于stack exchange,提问作者MadSkeletor

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.04 09:32:06