There is no direct way to achieve this but you can easily work around this by adding/removing such users to a group and tweaking category permissions so that only this group can participate in the discussions.
Ah, OK. So like I could put them in a group which literally gave them no access/permissions, right?
Would they still be able to log in? Ideally, I don’t want them to be able to see or participate in any threads/categories. (i.e. have completely zero access)
If you want to deny them from logging in, The best way would be to use a 3rd party access management system and deny their access using your IAM system instead of discourse.