Multiple projects and roles

Hi! I’m new using auth0 and I’m linking it, but I’m having troubles with my current implementation.

My challenge is: I have users that can access multiple projects but in each project they have specific roles/permissions.

How can I deal with this case from the sign up to the sign in?

Hi @oandre,

Welcome to the Auth0 Community!

You you have a few options:

  • You can use role-based access control, which will allow you to assign roles to your users and grant them permissions based on those roles.
  • You can assign permissions directly to your users. This can be done under the user tab in the dashboard.
  • You can use the app_metadata property to control the user’s access.

Each solution will have pros and cons depending on the details of your use case. Generally, you will want some information in the token that indicates what projects the user has access to.

Hi @dan.woda ! How are you doing?

Thanks for your reply. I got your point but my use case is something like this:

  1. One user can have many authentication methods;
  2. This user can be connected to more than one project;
  3. In each project this user will have one specific role.

In the scenario you mentioned the role associated to the user won’t be related to the project, right?

I found a way to organize it. I can create organizations, add users to this companies and set specific roles to that user inside that organization.

Now I just have a problem to retrieve the connect user companies :grimacing:

1 Like

Glad you found a solution. Let us know if you have any questions!

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