FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Groups and Roles

    Scheduled Pinned Locked Moved
    General Discussion
    2
    4
    706
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      randall
      last edited by

      I would like to have a user enrolled in a group with a subscriber role. (There are multiple users under one subscription.). If the subscription runs out, I want to remove the subscriber role. If they renew the subscription, then add the subscription role back for everyone in the group.

      What do you think the best way is to accomplish this? Can this be done with the group update api?

      R 1 Reply Last reply Reply Quote 0
      • R
        randall @randall
        last edited by

        I figured this out. Using the group update api with a roleIds array that doesn't contain the subscriber role, the subscriber role is removed from everyone in the group.

        Regards

        mark.robustelliM 2 Replies Last reply Reply Quote 0
        • mark.robustelliM
          mark.robustelli @randall
          last edited by

          @randall You can definitely add roles and add/remove users to groups using the APIs. Roles are tied to applications and can be added and removed from groups. It would be pretty simple to have a Subscription group and then add and remove the user from the group as needed. Is that what you are trying to accomplish?

          1 Reply Last reply Reply Quote 0
          • mark.robustelliM
            mark.robustelli @randall
            last edited by

            @randall Glad you were able to figure it out.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post