Group based authorization

hi there,

I’m designing a system where we are using Auth0 for authentication. I want to use it for Authorization too, but not sure how can I use it. My design is,

Company
-> Projects
-> Groups (more than 1, it may vary based on project )
-> Roles (with permission)

a user can belong to a company with one or many projects and in that a user can belong to a specific group.

It was easy if a user can belong to only a specific group, doesnt matter which project, but in may case user can belong to different groups based on different project, it kind of complicates things.

Any ideas on how can I configure this model in Auth0.

thanks heaps,
Maulik Khandwala