FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login
    1. Home
    2. Tags
    3. groups
    Log in to post
    • All categories
    • Q

      Group & Role Design in a nearly multitenant Applicatino

      General Discussion
      • roles groups • • quirin.sailer
      4
      0
      Votes
      4
      Posts
      1.3k
      Views

      mark.robustelliM

      For those reading, please check out this post.

    • H

      Groups as companies

      Q&A
      • users groups customization custom fields • • harunkilic
      2
      0
      Votes
      2
      Posts
      901
      Views

      danD

      Hi @harunkilic ,

      Welcome to the FusionAuth community! I am glad you like the software.

      You can't create group fields. What you can do is assign roles to a group. If a user is in that group and registered for an application with those roles, they will assume the roles. For example:

      User A is in Group B. Group B has roles 1, 2, and 3. Role 1 is in Application Z. Role 2 and 3 are in Application X.

      If user A is registered for application X and is in Group B, they will have roles 2 and 3. They won't have role 1 because that is associated with application Z, which they are not registered for.

      You can't build your own entities, though that is on our roadmap. Follow this issue to be updated on when that feature is implemented. Full transparency, it will likely be a feature limited to our paid editions; learn more about our paid editions here.

      Whether groups make sense depends on a lot of things.

      Some questions to consider:

      Are you limiting application access by group? Are you going to be using the API to do so, or do you want to have the information in the JWTs and available after authentication? Does each company have an application? Are you going to use the hosted login pages or build your own?

      I can't give extensive architectural advice, but maybe if you talk a bit more about your use case the choice will be clearer.

    • danD

      Retrieving groups of users

      Q&A
      • groups search • • dan
      3
      0
      Votes
      3
      Posts
      1.2k
      Views

      danD

      Fix is live: https://github.com/FusionAuth/fusionauth-site/pull/147

    • danD

      Is there a way to get all the members of a particular group?

      Q&A
      • groups search • • dan
      2
      0
      Votes
      2
      Posts
      11.3k
      Views

      danD

      You need to use the user search API with an elastic search query string.

      Here's a curl example:

      API_KEY=.... GROUP_ID=f4a64b10-1cf6-4289-84c0-c3035f3b78bc curl -H "Authorization: $API_KEY" 'http://localhost:9011/api/user/search/?queryString=memberships.groupId:'$GROUP_ID

      If you are using the database search engine, you cannot find all the members of a group.

    • danD

      What’s your recommendation on handling roles across multiple applications within a Tenant?

      Q&A
      • groups roles tenant • • dan
      2
      0
      Votes
      2
      Posts
      3.6k
      Views

      danD

      Groups would be a good solution. The group just allows you to assign the roles to the group instead of the user - and then the group membership allows you to inherit those roles (assuming the user is registered for the application whose roles belong to the group).