Bogdan B
Bogdan B

Reputation: 934

How to add custom claims for a Client-Server app in ADFS 2019?

How to add custom claims for an application group of type "Web browser accessing a web application - Client-Server application" in the provided token?

I'm building a web app using an Angular client and .NET Core Backend. I've managed to authenticate the client, but i can't use explicit authorization roles for controllers since the token doesn't provide those roles, e.g.

[Authorize(Roles="Admin")]

Upvotes: 0

Views: 338

Answers (1)

rbrayb
rbrayb

Reputation: 46720

Yes - you have to augment the id_token as per this.

But in order to do the "Roles=Admin", you have to have a claims rule that sends the groups as a claim type of "Role".

Upvotes: 1

Related Questions