# How can I scope a user's role to a specific instance of a resource?

**URL:** <https://community.auth0.com/t/how-can-i-scope-a-users-role-to-a-specific-instance-of-a-resource/96033>\
**Category:** Get Help\
**Tags:** spring, api, actions, authorization, permissions\
**Created:** [December 8, 2022, 3:35pm UTC](https://community.auth0.com/t/how-can-i-scope-a-users-role-to-a-specific-instance-of-a-resource/96033 "2022-12-08T15:35:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattcouts](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mattcouts/32/33197_2.png) [@mattcouts](https://community.auth0.com/u/mattcouts)\
**Post date:** [December 8, 2022, 3:35pm UTC](https://community.auth0.com/t/how-can-i-scope-a-users-role-to-a-specific-instance-of-a-resource/96033/1 "2022-12-08T15:35:52Z")

</div>

I have an application that displays information about upcoming events (a birthday party, for example). For any event, a user should be able to serve as either a PARTICIPANT or ADMIN (these are the two application roles) but only for that selected event. They should be able to have a different role in each event.

For example, suppose I am a user. There are three events that I can register for: event#1, event#2, and event#3. I have been asked to serve as an admin for event#2 and I would like to be a participant in event#1. I should be able to fulfill my duties as an admin in event#2 but not in event#1 or event #3. Similarly, I should be able to fulfill my duties as a participant in event#1 but not event#2 or event#3.

How would I scope, for lack of a better term, the user’s role to a specific event so that a user can have different roles in different events?

---

<div class="post-metadata">

**Author:** ![mattcouts](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mattcouts/32/33197_2.png) [@mattcouts](https://community.auth0.com/u/mattcouts)\
**Post date:** [December 8, 2022, 3:51pm UTC](https://community.auth0.com/t/how-can-i-scope-a-users-role-to-a-specific-instance-of-a-resource/96033/2 "2022-12-08T15:51:11Z")

</div>

After some further research, it looks like I am looking for Relationship-Based Access Control as opposed to Role Based Access Control.

Here’s an article I read for that information: [Understanding a Media Consumer’s Social Graph](https://auth0.com/blog/understanding-a-media-consumers-social-graph/#Relationship-Based-Access-Control--ReBAC)

---

<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:** [December 22, 2022, 3:51pm UTC](https://community.auth0.com/t/how-can-i-scope-a-users-role-to-a-specific-instance-of-a-resource/96033/3 "2022-12-22T15:51:55Z")

</div>

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