Azure 如何添加类型为“的索赔”;StringCollection“;广告b2c中的自定义策略

Azure 如何添加类型为“的索赔”;StringCollection“;广告b2c中的自定义策略,azure,azure-active-directory,azure-ad-b2c,Azure,Azure Active Directory,Azure Ad B2c,我想添加两个类型为“StringCollection”的输出声明, 1.国家(如:美国、英国等) 2.组(例如:XX、XY、XZ) 用户注册时需要保存此数据,并需要将这些数据添加到令牌 我创建了以下索赔类型: <ClaimType Id="extension_countries"> <DisplayName>Countries</DisplayName> <DataType>stringCollection</

我想添加两个类型为“StringCollection”的输出声明, 1.国家(如:美国、英国等) 2.组(例如:XX、XY、XZ)

用户注册时需要保存此数据,并需要将这些数据添加到令牌

我创建了以下索赔类型:

<ClaimType Id="extension_countries">
        <DisplayName>Countries</DisplayName>
        <DataType>stringCollection</DataType>
        <UserHelpText>Country list</UserHelpText>
 </ClaimType>

国家
stringCollection
国家名单
和转型:

<ClaimsTransformation Id="CreateCountriesFromCountry" TransformationMethod="AddItemToStringCollection">
        <InputClaims>
          <InputClaim ClaimTypeReferenceId="country" TransformationClaimType="item" />
          <InputClaim ClaimTypeReferenceId="extension_countries" TransformationClaimType="collection" />
        </InputClaims>
        <OutputClaims>
          <OutputClaim ClaimTypeReferenceId="extension_countries" TransformationClaimType="collection" />
        </OutputClaims>
</ClaimsTransformation>

当我加上 对于相关方的“输出声明”,它显示了错误
“技术配置文件中的扩展属性“extension\u countries”不支持数据类型“StringCollection”

错误可能是由于AAD Graph API扩展属性的潜在限制:

可用类型:

  • 二进制的
  • 布尔值
  • 日期时间
  • 整数
  • 大整数

因此,您无法创建作为字符串集合的扩展属性。

作为一种解决方法,编写自己的REST函数将集合转换为字符串,反之亦然,前提是您的字符串大小不超过256个字符(我认为这是最大值)。

但我们有“OtherMail”,starter pack中的字符串集合它是用户的内置属性,而不是可理解的扩展,因此没有其他方法来创建字符串集合?