The actual legislation: https://leg.mt.gov/bills/2023/billpdf/SB0419.pdf Seems facially unconstitutional. Will maybe force a proper court decision on whether the Bills of Attainder clause applies to corporations. Why are legislators so focused on banning TikTok, rather than regulating whatever it is that TikTok does that they don't like? Don't like data about your constituents being in the possession of a company wit…
There are two issues with TikTok: privacy and national security. The latter is what this is about. (Related to e.g. our foreign media ownership rules.)
The federal legislation is trying to create an extensible system for forcing divestiture based on requirements you describe. This is more ham fisted.