Horcrux7
Horcrux7

Reputation: 24447

How to get standards claims of the openid scope "profile" from the ADFS server?

I want the standard openid claims from the scope profile with the ADFS service on Windows 20016.

My request call look like:

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

The id_token contains the follow:

{
aud=123456, 
sub=xyz, 
[email protected], 
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
}

The app was registered with the powershell line:

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

How can I get the claims like email, given_name and family_name?

Upvotes: 3

Views: 2223

Answers (1)

rbrayb
rbrayb

Reputation: 46720

Have you tried configuring this with the wizard because you can define claims rules on the Web API?

If that doesn't suit, have a look here at some examples.

Upvotes: 1

Related Questions