# Asp.net core api User.Identity.Name null/empty, bearer token token generated using "Resource Owner password flow"

**URL:** <https://community.auth0.com/t/asp-net-core-api-user-identity-name-null-empty-bearer-token-token-generated-using-resource-owner-password-flow/119932>\
**Category:** Get Help\
**Tags:** sdks-quickstarts, quickstarts-regular-web-application\
**Created:** [November 1, 2023, 7:44am UTC](https://community.auth0.com/t/asp-net-core-api-user-identity-name-null-empty-bearer-token-token-generated-using-resource-owner-password-flow/119932 "2023-11-01T07:44:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rameshbolla](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@rameshbolla](https://community.auth0.com/u/rameshbolla)\
**Post date:** [November 1, 2023, 7:44am UTC](https://community.auth0.com/t/asp-net-core-api-user-identity-name-null-empty-bearer-token-token-generated-using-resource-owner-password-flow/119932/1 "2023-11-01T07:44:39Z")

</div>

Hi,

I try to pay around Auth0 and [ASP.Net](http://ASP.Net) Core WebAPI, configurations are done correctly and I can able to generate a bearer access token based on article [Call Your API Using Resource Owner Password Flow](https://auth0.com/docs/get-started/authentication-and-authorization-flow/call-your-api-using-resource-owner-password-flow)

I have below lines of code in Startup.cs file

 ![image](https://global.discourse-cdn.com/auth0/original/3X/3/3/33c4521b92d93836567c22ded95e94fbc4151703.png)

In my controller, I see the user is authenticated and couple of claims information also presents.

I would like to capture user email address and name, but from User.Claims or Context.User.Indentity.Name giving null.

how to extract user details who is authenticated already , please help me in this regards.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [November 6, 2023, 5:35pm UTC](https://community.auth0.com/t/asp-net-core-api-user-identity-name-null-empty-bearer-token-token-generated-using-resource-owner-password-flow/119932/3 "2023-11-06T17:35:58Z")

</div>

Hi @rameshbolla

Welcome to the Auth0 Community!

If you inspect the token (you can use [jwt.io](http://jwt.io)) do you see the name and email claims you are looking for?

---

<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:** [November 20, 2023, 5:36pm UTC](https://community.auth0.com/t/asp-net-core-api-user-identity-name-null-empty-bearer-token-token-generated-using-resource-owner-password-flow/119932/4 "2023-11-20T17:36:08Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
