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

Azure B2C自定义流程如何修改颁发者为tfp格式适配Power Pages?

解决Azure B2C自定义流程对接Power Pages的颁发者URL格式问题
  • 检查自定义策略的Metadata配置
    打开你的B2C自定义策略文件(比如TrustFrameworkExtensions.xml),找到JwtIssuer技术配置文件,添加IssuanceClaimPattern元数据项,强制颁发者返回tfp格式:

    <ClaimsProvider>
      <DisplayName>Local Account</DisplayName>
      <TechnicalProfiles>
        <TechnicalProfile Id="JwtIssuer">
          <Metadata>
            <Item Key="IssuanceClaimPattern">AuthorityWithTfp</Item>
            <Item Key="tenantId">{Policy:TenantObjectId}</Item>
            <Item Key="client_id">{ServicePrincipal:ClientId}</Item>
            <Item Key="IssuerUri">https://{tenant}.b2clogin.com/{Policy:TenantObjectId}/v2.0/</Item>
          </Metadata>
        </TechnicalProfile>
      </TechnicalProfiles>
    </ClaimsProvider>
    

    这行IssuanceClaimPattern设为AuthorityWithTfp是核心,它会让颁发者URL自动带上tfp路径和策略ID。

  • 验证Power Pages身份提供者配置
    在Power Pages后台的身份提供者设置里,确认:

    • 选的是Azure AD B2C类型,不是普通Azure AD
    • 准确填写自定义策略的ID(比如B2C_1A_signup_signin)
    • 元数据地址指向自定义策略的OpenID配置端点,格式为:https://{tenant}.b2clogin.com/{tenant}.onmicrosoft.com/{policy-id}/v2.0/.well-known/openid-configuration
  • 清除缓存重新测试

    1. 发布更新后的B2C自定义策略
    2. 在Power Pages后台点击同步身份提供者
    3. 清空浏览器缓存或者用无痕模式测试登录流程
  • 手动硬编码无效的原因
    Power Pages会自动从B2C的元数据端点拉取颁发者信息,手动修改的配置会被覆盖,所以必须通过B2C自定义策略本身调整格式。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.13 18:43:23