Well, there are so many ways this could go, but here are my decidedly-not-a-lawyer opinions.

Confiscating the phone was fine, as its presence was against the published rules of the school. Usually, the student themselves can request them back at the end of the day with a promise not to break the rule again. In some cases, especially with more expensive electronic items, a parent must make the request to retrieve confiscated property of a minor.

However, confiscation does not transfer property rights, only the securing of evidence. The principal admitted that she "did what she always does --- scroll through the contact list and call other students, trying to catch others violating the campus rule." Hoo, boy. Legal team's going to have fun with that.

The item in question may be used as evidence by legal authorities, but unless there's reasonable cause --- IE, "Sam" was smoking up a doobie when they found him with the phone --- then this whole thing could be considered entrapment. Without that cause, looking through the phone's address book could be construed as a breach of privacy; and calling anyone with the confiscated phone could be theft of services. Where I live, a principal is not a sworn officer of the law, and thus any handling of the phone other than putting it into safe-keeping could make it "tampered evidence".

If "Sam" had been smoking up a doobie, the phone had of its own accord buzzed with a text message, or had had an open call with "Pot Dealer"... then it should've immediately been handed to the police to handle. The principal attempting to lure the dealer onto grounds? Entrapment.

Don't get me wrong, though --- I'm not defending Sam or Juan. Stupid idjits, both of 'em. But the principal's on the stupid side of the fence, here, too.