# How do I add a scope to a user?

**URL:** <https://community.auth0.com/t/how-do-i-add-a-scope-to-a-user/11766>\
**Category:** Get Help\
**Tags:** scopes\
**Created:** [May 22, 2018, 9:02pm UTC](https://community.auth0.com/t/how-do-i-add-a-scope-to-a-user/11766 "2018-05-22T21:02:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jackiegleason](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jackiegleason/32/8119_2.png) [@jackiegleason](https://community.auth0.com/u/jackiegleason)\
**Post date:** [May 22, 2018, 9:02pm UTC](https://community.auth0.com/t/how-do-i-add-a-scope-to-a-user/11766/1 "2018-05-22T21:02:38Z")

</div>

How would I assign a scope to a user? For example I have the following…

```
@GetMapping("/admin")
@PreAuthorize("hasAuthority('read:client_grants')")
public void getAdmin(){
	System.out.println("Free Bird!");
}

```

So how do I add the read:client\_grants to a user?

---

<div class="post-metadata">

**Author:** ![sgmeyer](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sgmeyer/32/3387_2.png) [@sgmeyer](https://community.auth0.com/u/sgmeyer)\
**Post date:** [May 23, 2018, 1:06pm UTC](https://community.auth0.com/t/how-do-i-add-a-scope-to-a-user/11766/2 "2018-05-23T13:06:10Z")

</div>

@jackiegleason this shouldn’t be done directly. For example when Auth0 issues a token it issues scopes the resource owner is allowed to see. The resource owner in this case is the user. This user does not technically own that data so auth0 will not issue a toke on behalf of a user to get at that data.

The user happens to be an admin, but this does not mean they are the owner of the resource. From an OAuth standpoint the client owns that data and is the resource owner. To allow an admin to see this data you must create your own confidential client (could be a regular web application or an API) that the admin can talk to. This API would then, via client credentials, request a token with `read:client_grants`.

---

<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:** [August 27, 2019, 12:11pm UTC](https://community.auth0.com/t/how-do-i-add-a-scope-to-a-user/11766/3 "2019-08-27T12:11:27Z")

</div>

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