自定义策略中的 Azure B2c 自定义属性不在令牌中

时间:2020-12-28 13:32:26

标签: azure azure-ad-b2c azure-ad-b2c-custom-policy

我在 Azure B2c 中创建了一个自定义策略并使用了自定义属性。

但是,自定义属性仅在用户创建帐户时输入令牌。当他再次登录时,自定义属性没有出现在令牌中。

下面是我的 RelyingParty。

<RelyingParty>
    <DefaultUserJourney ReferenceId="SignUpOrSignIn" />
    <TechnicalProfile Id="PolicyProfile">
      <DisplayName>PolicyProfile</DisplayName>
      <Protocol Name="OpenIdConnect" />
      <OutputClaims>
        <OutputClaim ClaimTypeReferenceId="displayName" />
        <OutputClaim ClaimTypeReferenceId="givenName" />
        <OutputClaim ClaimTypeReferenceId="surname" />
        <OutputClaim ClaimTypeReferenceId="email" />
        <OutputClaim ClaimTypeReferenceId="objectId" PartnerClaimType="sub"/>
        <OutputClaim ClaimTypeReferenceId="identityProvider" />
        <OutputClaim ClaimTypeReferenceId="tenantId" AlwaysUseDefaultValue="true" DefaultValue="{Policy:TenantObjectId}" />
        <OutputClaim ClaimTypeReferenceId="extension_time" DefaultValue="" />
      </OutputClaims>
      <SubjectNamingInfo ClaimType="sub" />
    </TechnicalProfile>
  </RelyingParty>

1 个答案:

答案 0 :(得分:1)

将 extension_time 作为输出声明添加到 AAD-UserReadUsingObjectId 技术配置文件中。

相关问题