我想添加两个“StringCollection”类型的输出声明, 1. 国家(例如:美国、英国等) 2.组(例如:XX、XY、XZ)
用户注册时需要保存这些数据,并且需要将这些数据添加到 token
我创建了以下声明类型:
<ClaimType Id="extension_countries">
<DisplayName>Countries</DisplayName>
<DataType>stringCollection</DataType>
<UserHelpText>Country list</UserHelpText>
</ClaimType>
和转换:
<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>
当我添加时 对于 RelyingParty 的“OutputClaims”,它显示错误 “技术配置文件中的扩展属性“extension_countries”不支持数据类型“StringCollection””
最佳答案
该错误可能是由于 AAD Graph API 扩展属性的潜在限制造成的:https://learn.microsoft.com/en-us/previous-versions/azure/ad/graph/howto/azure-ad-graph-api-directory-schema-extensions#extension-data-types--
可用类型:
- 二进制
- bool 值
- 日期时间
- 整数
- 大整数
- 字符串
因此您无法创建作为字符串集合的扩展属性。
关于azure - 如何在广告 B2C 自定义政策中添加类型 "StringCollection"的声明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58613680/