Suspend an Organisation?

Is it possible to suspend an organisation i.e. for none payment? At the moment it looks like I have to loop through all users and suspend them individually.
5 Replies
IkiTg07
IkiTg072w ago
Unfortunately you can't. Could you please share your use case tho ?
TotalScrub
TotalScrub2w ago
I'm not the OP but it's something that I think a lot of people might need, especially with Kinde's upcoming billing capability. I think that the OP's use case is a good one. If an organisation is not paying (or has cancelled their account without wanting to delete all of their data) you would need to loop through each user and suspend them. Also, if you disable each user in this way and the organisation later reactivates (or makes payment) you can only guess based off the last time the user was updated if it was due to the logical deactivation of the organisation (in which case they should be reactivated) or if it was a deactivation for some other reason. (E.g. the user left the business so an admin deactivated them) I wasn't aware that organisations couldn't be suspend (I'm still pretty new to Kinde) so I guess I'd need to manage this externally by keeping a state of the organisation linked to the Kinde organisation (which I'm already doing) with an active / deactive status. But the issue is that from Kinde's perspective users belonging to that organisation could still be authenticated . Custom middleware could be created to check the state of the organisation outside of Kinde, but IMO it does mean the security is a little more brittle. (Unless as suggested by OP you loop through every user to deactivate them)
dillorscroft
dillorscroftOP2w ago
Its a simple use case. I use organisations to group my SaaS customers by their company/organisation. If the company fails to pay the bills I suspend the organisation and all their users. At the moment I have to loop through all users. If this was 5,000 which is possible it will be a pain. I have gone down the route of a local status for the user which the organisation controls i.e. they have 100 seats in my SaaS product but 112 users so some will be inactive. They org can make this decision themselves. If I suspend the organisation for none payment I need to know which of the 112 will be active if they pay and are unsuspended up so I ended up with an an AuthStatus flag against the user too.
IkiTg07
IkiTg077d ago
I see how it could be a pain yeah. I’ll let the team know !
Oli - Kinde
Oli - Kinde7d ago
Hey @dillorscroft and @TotalScrub, I totally agree with your use-case and this is especially useful when using Kinde for our upcoming Billing feature. I have noted down this request (and use-case) to suspend an org
Want results from more Discord servers?
Add your server