# Permissions (Scopes)

**URL:** <https://community.auth0.com/t/permissions-scopes/106645>\
**Category:** Get Help\
**Tags:** grants, management-api\
**Created:** [May 10, 2023, 3:56pm UTC](https://community.auth0.com/t/permissions-scopes/106645 "2023-05-10T15:56:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dotaolaoqua](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@dotaolaoqua](https://community.auth0.com/u/dotaolaoqua)\
**Post date:** [May 10, 2023, 3:56pm UTC](https://community.auth0.com/t/permissions-scopes/106645/1 "2023-05-10T15:56:39Z")

</div>

Hi,

I need help. Which permissions (scopes) do I need if I want to do the following?

1. Write in the local SQL server database
2. Get the username (ex.: HttpContext.User.Identity.Name)

Thank you!

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [May 10, 2023, 8:03pm UTC](https://community.auth0.com/t/permissions-scopes/106645/3 "2023-05-10T20:03:30Z")

</div>

Hey there @dotaolaoqua !

1. This is really outside of the scope of Auth0 scopes - This is more related to your own application’s logic and how you manage it.
2. If you are looking to use an SDK method like `HttpContext.User.Identity.Name` then the user will need an ID Token. This will be included if the `profile` scope is passed in however you are authorizing users. If you are instead referring to using the Management API directly with a Management API [access token](https://auth0.com/docs/secure/tokens/access-tokens/management-api-access-tokens) then you will need an access token with the `read:users` scope to hit the [get users by id endpoint](https://auth0.com/docs/api/management/v2#!/Users/get_users_by_id).

Hope this helps!

---

<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:** [May 24, 2023, 8:04pm UTC](https://community.auth0.com/t/permissions-scopes/106645/4 "2023-05-24T20:04:09Z")

</div>

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