# How to get to the email\_verified api int AuthO user profile with ASP.NET Core AUthorization Policy

**URL:** <https://community.auth0.com/t/how-to-get-to-the-email-verified-api-int-autho-user-profile-with-asp-net-core-authorization-policy/7918>\
**Category:** Get Help\
**Tags:** user-profile, authorization-polici\
**Created:** [August 21, 2017, 10:58pm UTC](https://community.auth0.com/t/how-to-get-to-the-email-verified-api-int-autho-user-profile-with-asp-net-core-authorization-policy/7918 "2017-08-21T22:58:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yzolotarev](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/yzolotarev/32/7888_2.png) [@yzolotarev](https://community.auth0.com/u/yzolotarev)\
**Post date:** [August 21, 2017, 10:58pm UTC](https://community.auth0.com/t/how-to-get-to-the-email-verified-api-int-autho-user-profile-with-asp-net-core-authorization-policy/7918/1 "2017-08-21T22:58:28Z")

</div>

Set up: [ASP.NET](http://ASP.NET) Core Angular Auth0

So I have created an autorization policy like this:

```
services.AddAuthorization(options => {
options.AddPolicy("EmailConfirmed", policy =>policy.RequireClaim
("https://webatom.auth0.com/userinfo/email_verified","true")); });

```

I want to get the email\_verified value and if its true then I want to allow the api cals in the MVC Controller

So after this I secure the actions with

```
[Authorize("EmailConfirmed")]

```

However I keep on getting a 403 forbidden. Must be something with the required claim type. Has anyone come across such issue?

---

<div class="post-metadata">

**Author:** ![jerrie](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jerrie/32/5898_2.png) [@jerrie](https://community.auth0.com/u/jerrie)\
**Post date:** [August 24, 2017, 1:47am UTC](https://community.auth0.com/t/how-to-get-to-the-email-verified-api-int-autho-user-profile-with-asp-net-core-authorization-policy/7918/2 "2017-08-24T01:47:04Z")

</div>

Have you confirmed that the `id_token` contains that claim? Also, have you confirmed that the User object actually contains that claim?

Here is a sample Razor page which shows how to dump the claims to the screen for you to inspect… [https://github.com/auth0-samples/auth0-aspnetcore-mvc-samples/blob/master/Quickstart/00-Starter-Seed/SampleMvcApp/Views/Account/Claims.cshtml](https://github.com/auth0-samples/auth0-aspnetcore-mvc-samples/blob/master/Quickstart/00-Starter-Seed/SampleMvcApp/Views/Account/Claims.cshtml)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:56am UTC](https://community.auth0.com/t/how-to-get-to-the-email-verified-api-int-autho-user-profile-with-asp-net-core-authorization-policy/7918/3 "2018-03-02T05:56:02Z")

</div>


