将自定义 OpenID Connect 声明映射到联系人属性

Map custom OpenID Connect claim to contact attribute

我正在使用 OpenID Connect 提供程序 (https://docs.microsoft.com/en-us/dynamics365/customer-engagement/portals/configure-openid-settings) 在 Dynamics 365 门户中进行身份验证。

Sid 自动设置为userId。是否可以将其他自定义声明映射到已创建联系人的属性?

我不确定这是否适用于 OpenID Connect 提供商,但您可以为 Azure AD B2C provider settings for portals 进行声明映射,因此在使用类似站点设置的情况下,相同的过程可能会起作用。

Name: Authentication/OpenIdConnect/[Federation-Name]/RegistrationClaimsMapping

Description: List of logical name/claim pairs to be used to map claim values to attributes in the contact record created during registration.

Format: attribute1=claim1,attribute2=claim2,attribute3=claim3

For example: firstname=http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname,lastname=http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname,jobtitle=jobTitle