Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Azure by (13.1k points)
We have an application based on MVC and for that we are working on authentication and want to add some custom claims in it. Whenever we tried to add it, shows an error. Can anyone help me with this?

1 Answer

0 votes
by (26.7k points)

In able to do that, first you need to create a policy for a custom claims and for that, take a look at Claims mapping policy. Below is the command you can take it as an example:

New-AzureADPolicy -Definition @('{"ClaimsMappingPolicy":{"Version":1,"IncludeBasicClaimSet":"true", "ClaimsSchema": [{"Source":"user","ID":"department","JwtClaimType":"department"}]}}') -DisplayName "ExtraClaimsExample” -Type "ClaimsMappingPolicy"

I hope this will help.

Want to become an Azure expert? join azure architect certification now!!

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...