Reasonable pat-down search or not?

And this happened a month ago. Our ROTC drill teams went to another school for a drill competition. Towards the end, when we were about to leave, someone lost their iphone. So the teacher, (Master Sergeant AF), told 5 of the highest ranked senior cadets to pat everyone down, including searching inside their backpacks and pockets. Is this right according to law? Btw the phone turned out in the heater, and our instructor is retired from AF. Our students were searched (not the whole school)

Not too sure about the civilian legal aspect but there's no privacy in the Military. Get used to someone getting in your personal space once you're in.

You were on school property and he was a teacher. Not a problem!

You most obvious misconception is that the military is required to to be constrained by the same rules as civilian police officers are.

You are in the ROTC, so I assume that at some point they must make you abide by military discipline. If you think that you will actually become a Commissioned Officer in the military, you better abandon your civilian attitude that your individual rights are of preeminent importance.

You asked, "Is this right according to law? " That is not an issue. Is it in accordance with the UCMJ? Is it in accordance with military regulations? Is in in accordance with the maintenance of good military discipline.

As far as I'm concerned, if you are a lowly ROTC cadet, and an E-7 Master Sergeant wants to check you head to toe, inside out or upside down, he has the authority to do so.