如何上传 Azure 自定义策略

时间:2021-06-11 05:34:38

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

我一直在研究 azure,并且在登录过程中我正在上传政策。 但是我在上传时遇到错误。 “alternativesecurityid 不在输出声明中 azure”。 任何人都可以指导我。

此致, 阿岛

1 个答案:

答案 0 :(得分:0)

在 Azure Active Directory B2C (Azure AD B2C) 中,社交帐户身份存储在替代安全IdCollection 声明类型的 userIdentities 属性中。 我们需要创建用户的alternativeSecurityId 属性的JSON 表示,该属性可用于对Azure Active Directory 的调用。 使用此声明转换生成一个替代的SecurityId ClaimType。所有社交身份提供商的技术配置文件都使用它,例如 Facebook-OAUTH 以下声明转换接收用户社交帐户 ID 和身份提供商名称。

<ClaimsTransformation Id="AddAnotherAlternativeSecurityId" TransformationMethod="AddItemToAlternativeSecurityIdCollection">
  <InputClaims>
    <InputClaim ClaimTypeReferenceId="AlternativeSecurityId2" TransformationClaimType="item" />
    <InputClaim ClaimTypeReferenceId="AlternativeSecurityIds" TransformationClaimType="collection" />
  </InputClaims>
  <OutputClaims>
    <OutputClaim ClaimTypeReferenceId="AlternativeSecurityIds" TransformationClaimType="collection" />
  </OutputClaims>
</ClaimsTransformation>