如何获得openid范围的标准声明" profile"从ADFS服务器?

时间:2018-02-15 10:35:11

标签: oauth openid adfs oidc

我希望范围profile中的standard openid claims与Windows 20016上的ADFS服务一起使用。

我的请求电话如下:

https://myserver/adfs/oauth2/authorize?
     response_type=code&
     client_id=123456&
     redirect_uri=http://localhost/bar&
     scope=openid%20email%20profile

id_token包含以下内容:

{
aud=123456, 
sub=xyz, 
upn=bob@company.local, 
unique_name=COMPANY\bob, 
auth_time=1518686971, 
iss=https://adfs.company.local/adfs, 
exp=1518690571, 
iat=1518686971, 
sid=S-1-5-21-123-456-789-098
}

该应用已在powershell专栏注册:

Add-AdfsClient -Name "foo" -ClientId "123456" -RedirectUri @("http://localhost/")

如何获得emailgiven_namefamily_name等声明?

1 个答案:

答案 0 :(得分:1)

您是否尝试使用向导进行配置,因为您可以在Web API上定义声明规则?

如果不合适,请在某些示例中查看here