【发布时间】:2018-07-25 16:51:48
【问题描述】:
我目前正在使用内置属性。
我想从 FB 获取“age_range”和“gender”。
我是否需要按照以下主题中的说明处理自定义策略:
如何使用 Azure AD B2C 获取 Facebook 个人资料图片
how to get Facebook profile picture using Azure AD B2C
得到它们?
谢谢!
【问题讨论】:
标签: azure-ad-b2c
我目前正在使用内置属性。
我想从 FB 获取“age_range”和“gender”。
我是否需要按照以下主题中的说明处理自定义策略:
如何使用 Azure AD B2C 获取 Facebook 个人资料图片
how to get Facebook profile picture using Azure AD B2C
得到它们?
谢谢!
【问题讨论】:
标签: azure-ad-b2c
是的,您必须为此创建一个自定义策略,然后:
1:在扩展文件中声明“ageRange”和“gender”声明类型。
2:将“age_range”和“gender”字段添加到“ClaimsEndpoint”元数据项,并将“ageRange”和“gender”输出声明添加到“Facebook-OAUTH”技术配置文件。
3:在信赖方文件中发出“ageRange”和“gender”声明。
如果要将 Facebook 中的“age_range”和“gender”字段作为属性保存到 Azure AD B2C,则必须:
1:按照Azure Active Directory B2C: Creating and using custom attributes in a custom profile edit policy 的步骤为“AgeRange”和“Gender”创建自定义属性。
2:将声明类型声明以及对它们的所有其他引用从“ageRange”和“gender”更改为“extension_AgeRange”和“extension_Gender”。
3:将扩展文件中的“extension_AgeRange”和“extension_Gender”声明添加到“AAD-UserWriteUsingAlternativeSecurityId”和“AAD-UserReadUsingAlternativeSecurityId”技术配置文件中:
<ClaimsProvider>
<DisplayName>Facebook</DisplayName>
<TechnicalProfiles>
<TechnicalProfile Id="AAD-UserReadUsingAlternativeSecurityId">
<OutputClaims>
<OutputClaim ClaimTypeReferenceId="extension_AgeRange" />
<OutputClaim ClaimTypeReferenceId="extension_Gender" />
</OutputClaims>
</TechnicalProfile>
<TechnicalProfile Id="AAD-UserWriteUsingAlternativeSecurityId">
<PersistedClaims>
<PersistedClaim ClaimTypeReferenceId="extension_AgeRange" />
<PersistedClaim ClaimTypeReferenceId="extension_Gender" />
</PersistedClaims>
</TechnicalProfile>
</TechnicalProfiles>
</ClaimsProvider>
【讨论】: