Not getting user identity in JWT used in OAuth2 access token from ADFS 3.0

牧云@^-^@ 提交于 2019-12-06 05:10:23

claim rules in relying party trust need to define the claims to be sent as part of JWT token. Once we added the claim rules for email, name etc, the information was added to the JWT access token.

  1. Edit the Claims Provider Trust for Active Directory in ADFS to pass though email, name, etc.

    • Open ADFS. Click on "Claims Provider Trusts". Click on "Active Directory".

    • Then, click "Edit Claim Rules" on the right.

      You should now see the Edit Claims dialog.

      For instructions re: adding claims, refer to this video. Skip to time index 2:40. Edit Claims Provider Rules
  2. Edit the Relying Party Trust's claims. For email, name, etc., add a matching Issuance Transformation Rule using LDAP as the rule type and select Active Directory as the Attribute Store source. Do this by repeating the the above steps for the relying party trust associated /w your JWT client.

    To add relying party claims, refer to this video and skip to time index 14:35 Edit Relying Party Claim Rules

I recommend passing SAM-Account-Name through as http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name. I vaguely remember WIF having issues /w the ClaimsPrincipal if you don't.

Also, you must enable claims support on Active Directory if you haven't already done so.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!