As a general rule: A non-citizen entering a foreign country should either comply with instructions from immigration or be prepared to leave and possibly be barred from entering for a period of years.
As for the TSA, the only thing they can force you to do is to leave through the entrance