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

Groups and Roles

Scheduled Pinned Locked Moved
General Discussion
2
4
839
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 3 Jan 2025, 15:24

    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 3 Jan 2025, 16:34 Reply Quote 0
    • R
      randall @randall
      last edited by 3 Jan 2025, 16:34

      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

      M 2 Replies Last reply 3 Jan 2025, 16:40 Reply Quote 0
      • M
        mark.robustelli @randall
        last edited by 3 Jan 2025, 16:40

        @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
        • M
          mark.robustelli @randall
          last edited by 3 Jan 2025, 16:41

          @randall Glad you were able to figure it out.

          1 Reply Last reply Reply Quote 0
          3 out of 4
          • First post
            3/4
            Last post